Click here to Skip to main content
14,870,739 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to terminate an MFC application after a period of inactivity Pin
David Crow5-Sep-07 3:25
MemberDavid Crow5-Sep-07 3:25 
GeneralRe: How to terminate an MFC application after a period of inactivity Pin
Vaclav_5-Sep-07 6:12
MemberVaclav_5-Sep-07 6:12 
GeneralRe: How to terminate an MFC application after a period of inactivity Pin
David Crow5-Sep-07 6:18
MemberDavid Crow5-Sep-07 6:18 
QuestionPossible to prevent [Space] key from pressing OK, and [Esc] pressing CANCEL ? Pin
abiemann4-Sep-07 9:42
Memberabiemann4-Sep-07 9:42 
AnswerRe: Possible to prevent [Space] key from pressing OK, and [Esc] pressing CANCEL ? Pin
Chris Losinger4-Sep-07 10:23
professionalChris Losinger4-Sep-07 10:23 
GeneralRe: Possible to prevent [Space] key from pressing OK, and [Esc] pressing CANCEL ? Pin
abiemann5-Sep-07 7:12
Memberabiemann5-Sep-07 7:12 
AnswerRe: Possible to prevent [Space] key from pressing OK, and [Esc] pressing CANCEL ? Pin
David Crow4-Sep-07 13:33
MemberDavid Crow4-Sep-07 13:33 
GeneralRe: Possible to prevent [Space] key from pressing OK, and [Esc] pressing CANCEL ? Pin
abiemann5-Sep-07 7:01
Memberabiemann5-Sep-07 7:01 
I've added BN_CLICKED handlers:
S2000_CP_DLG::OnExitOK()
S2000_CP_DLG::OnExitCANCEL()

and for good measure I've stubbed-out the base functions: (probably unnecessary)
S2000_CP_DLG::OnOK()
S2000_CP_DLG::OnCancel()

so what happens now is that when I press [Esc] the OnExitCANCEL() is called.
When I press [Enter] or [Space] the OnExitOK() is called.

but since the app has to run through some code when OK and CANCEL are clicked I can't just leave the handlers empty.

Hence, within the handlers I think I need to detect if the keyboard was used to click the button. If no, then proceed with processing and close the dialog. If yes, then exit the handler.

I just don't know how to detect if the keyboard was used to enter OnExitOK and OnExitCANCEL.
AnswerRe: Possible to prevent [Space] key from pressing OK, and [Esc] pressing CANCEL ? Pin
abiemann5-Sep-07 7:34
Memberabiemann5-Sep-07 7:34 
QuestionModifying consoles display Pin
Waldermort4-Sep-07 7:55
MemberWaldermort4-Sep-07 7:55 
AnswerRe: Modifying consoles display Pin
jeron14-Sep-07 8:21
Memberjeron14-Sep-07 8:21 
QuestionRe: Modifying consoles display Pin
Waldermort4-Sep-07 8:23
MemberWaldermort4-Sep-07 8:23 
AnswerRe: Modifying consoles display Pin
jeron14-Sep-07 8:26
Memberjeron14-Sep-07 8:26 
QuestionLink error in VC++ 8 Pin
shpid3r4-Sep-07 7:35
Membershpid3r4-Sep-07 7:35 
AnswerRe: Link error in VC++ 8 Pin
Peter Weyzen4-Sep-07 10:21
MemberPeter Weyzen4-Sep-07 10:21 
AnswerRe: Link error in VC++ 8 Pin
shpid3r14-Sep-07 7:37
Membershpid3r14-Sep-07 7:37 
QuestionHow to add virtual ip in the windows xp to using c++? Pin
songjacky4-Sep-07 5:37
Membersongjacky4-Sep-07 5:37 
Questionfailed to identify Windows script name Pin
Jack Rong4-Sep-07 4:34
MemberJack Rong4-Sep-07 4:34 
QuestionMACRO for pulling source/function name for display Pin
Like2Byte4-Sep-07 4:17
MemberLike2Byte4-Sep-07 4:17 
AnswerRe: MACRO for pulling source/function name for display Pin
led mike4-Sep-07 4:31
Memberled mike4-Sep-07 4:31 
GeneralRe: MACRO for pulling source/function name for display Pin
Like2Byte4-Sep-07 4:34
MemberLike2Byte4-Sep-07 4:34 
AnswerRe: MACRO for pulling source/function name for display Pin
cmk4-Sep-07 13:43
Membercmk4-Sep-07 13:43 
QuestionIcon problem for dialog of MFC DLL. Pin
Mushtaque Nizamani4-Sep-07 4:06
MemberMushtaque Nizamani4-Sep-07 4:06 
AnswerRe: Icon problem for dialog of MFC DLL. Pin
Derrick Becker4-Sep-07 4:17
MemberDerrick Becker4-Sep-07 4:17 
GeneralRe: Icon problem for dialog of MFC DLL. Pin
Mushtaque Nizamani4-Sep-07 5:23
MemberMushtaque Nizamani4-Sep-07 5:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.