Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 1st, 2006, 11:17 AM   #1
jayme
Professional Programmer
 
jayme's Avatar
 
Join Date: Nov 2005
Location: Canada
Posts: 495
Rep Power: 0 jayme is an unknown quantity at this point
Send a message via MSN to jayme
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:
Originally Posted by Mohamed Jihad
Durka durka!
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!
jayme is offline   Reply With Quote
Old Jan 1st, 2006, 11:56 AM   #2
Cache
Hobbyist
 
Join Date: Sep 2005
Posts: 261
Rep Power: 4 Cache is on a distinguished road
It's really easy to find out about this kind of thing on MSDN.

Console Control handlers

Character-Mode Applications (console)
Cache is offline   Reply With Quote
Old Jan 1st, 2006, 1:30 PM   #3
para
Programmer
 
Join Date: Dec 2005
Posts: 65
Rep Power: 3 para is on a distinguished road
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.
para is offline   Reply With Quote
Old Jan 1st, 2006, 2:40 PM   #4
Cache
Hobbyist
 
Join Date: Sep 2005
Posts: 261
Rep Power: 4 Cache is on a distinguished road
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.
Cache is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:07 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC