Click here to Skip to main content
15,888,461 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionanyone expert in C++ help me please Pin
omegahawk19-Mar-06 3:47
omegahawk19-Mar-06 3:47 
AnswerRe: anyone expert in C++ help me please Pin
Chris Losinger19-Mar-06 4:17
professionalChris Losinger19-Mar-06 4:17 
QuestionMemory leak detection Pin
Waldermort19-Mar-06 1:41
Waldermort19-Mar-06 1:41 
AnswerRe: Memory leak detection Pin
Joe Woodbury19-Mar-06 11:42
professionalJoe Woodbury19-Mar-06 11:42 
QuestionUnknown message Pin
Irina Tseitlin19-Mar-06 1:16
Irina Tseitlin19-Mar-06 1:16 
AnswerRe: Unknown message Pin
karle19-Mar-06 5:26
karle19-Mar-06 5:26 
AnswerRe: Unknown message Pin
Stephen Hewitt19-Mar-06 11:46
Stephen Hewitt19-Mar-06 11:46 
QuestionHow do I know if an OK event came from mouse or Enter? Pin
IlanTal18-Mar-06 23:31
IlanTal18-Mar-06 23:31 
How can I tell if my arrival to OnBnClickedOk() came from a mouse click or from a keyboard entry of Enter?

The reason this is important is that I have a multi line edit box and if the user hits Enter while in this edit box I don’t want the system to act as if he clicked on OK.

I already tried removing the Default Button Status from the OK button, but that makes no difference. I can see that if I click on the edit box, the added black line on the OK button remains, as if it has the focus, which of course it doesn’t. Even if I tab to this control the added black line on the OK button remains, showing that Enter will activate it.

Clearly, if I could know in my event handler for the OK button if the event came from a mouse click or from a keyboard Enter, there would be no problem dealing with it.

Any suggestions would be appreciated. Thanks,

Ilan

AnswerRe: How do I know if an OK event came from mouse or Enter? Pin
Waldermort19-Mar-06 1:31
Waldermort19-Mar-06 1:31 
AnswerRe: How do I know if an OK event came from mouse or Enter? Pin
Graham Bradshaw19-Mar-06 2:59
Graham Bradshaw19-Mar-06 2:59 
GeneralRe: How do I know if an OK event came from mouse or Enter? Pin
IlanTal19-Mar-06 4:03
IlanTal19-Mar-06 4:03 
AnswerRe: How do I know if an OK event came from mouse or Enter? Pin
Chris Gao19-Mar-06 10:30
Chris Gao19-Mar-06 10:30 
AnswerRe: How do I know if an OK event came from mouse or Enter? Pin
Chris Gao19-Mar-06 10:32
Chris Gao19-Mar-06 10:32 
Questionhelp! Pin
harry~18-Mar-06 21:32
harry~18-Mar-06 21:32 
AnswerRe: help! Pin
Waldermort19-Mar-06 1:37
Waldermort19-Mar-06 1:37 
AnswerRe: help! Pin
Hamid_RT19-Mar-06 2:46
Hamid_RT19-Mar-06 2:46 
AnswerRe: help! Pin
Robert Palma Jr.19-Mar-06 7:56
Robert Palma Jr.19-Mar-06 7:56 
QuestionWin32 Radio Button problem Pin
amanoullah18-Mar-06 20:54
amanoullah18-Mar-06 20:54 
AnswerRe: Win32 Radio Button problem Pin
Monty218-Mar-06 21:18
Monty218-Mar-06 21:18 
AnswerRe: Win32 Radio Button problem Pin
Jörgen Sigvardsson18-Mar-06 22:23
Jörgen Sigvardsson18-Mar-06 22:23 
AnswerRe: Win32 Radio Button problem Pin
Hamid_RT19-Mar-06 2:28
Hamid_RT19-Mar-06 2:28 
QuestionConvet Binary tree to Circular linked list Pin
Ilamparithi18-Mar-06 20:26
Ilamparithi18-Mar-06 20:26 
AnswerRe: Convet Binary tree to Circular linked list Pin
El Corazon19-Mar-06 8:22
El Corazon19-Mar-06 8:22 
QuestionGLUI user interface Pin
shanana18-Mar-06 16:44
shanana18-Mar-06 16:44 
Questionsingle line rich text problem Pin
Jim Crafton18-Mar-06 12:35
Jim Crafton18-Mar-06 12:35 

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.