![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 | |
|
Professional Programmer
|
console event handling
Is anyone familiar with console event handling, such as CTRL_BREAK_EVENT and others? If anyone would be kind enough how to explain anything i would appreciate it.
__________________
▄▄▄▄ Quote:
Due to incorrect calculations during the middle ages, our calendar actually begins a few years after Jesus' birth. Thus the real 6/6/6 happened a few years back. The world already ended and you missed it. Download Code::Blocks now! ▄▄▄▄ |
|
|
|
|
|
|
#2 |
|
Hobbyist
Join Date: Sep 2005
Posts: 266
Rep Power: 4
![]() |
It's really easy to find out about this kind of thing on MSDN.
Console Control handlers Character-Mode Applications (console) |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Dec 2005
Posts: 65
Rep Power: 3
![]() |
If you're working with *nix, check out documentation on tcgetattr() and related functions (they use the termios structure), or the library NCurses.
man page for tcgetattr - http://chrestomanci.org/cgi-bin/man/...ml?tcgetattr+3 ncurses howto - http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/ For CTRL+C the terminal generates the signal SIGINT (default action is termination) and sends it to the current attached process. You can control if the terminal generates the signal using the low level terminal interface through the tcgetattr() related functions. NCurses is a big wrapper that works for most terminals, and handles a lot of the terminal specifics behind the scenes. |
|
|
|
|
|
#4 |
|
Hobbyist
Join Date: Sep 2005
Posts: 266
Rep Power: 4
![]() |
Just a little more from the Win32 side:
A nice little tutorial posted on 'The Code Project' http://www.codeproject.com/win32/con...t_handling.asp The Code Project is a great site. I always check there for Win API stuff when MSDN seems to overcomplicate things -- sending you round in circles lol. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|