Click here to Skip to main content
15,921,250 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: close an application Pin
Russell'13-Jun-07 3:45
Russell'13-Jun-07 3:45 
GeneralRe: close an application Pin
Russell'13-Jun-07 3:53
Russell'13-Jun-07 3:53 
GeneralRe: close an application Pin
Hamid_RT13-Jun-07 9:01
Hamid_RT13-Jun-07 9:01 
GeneralRe: close an application Pin
Hamid_RT13-Jun-07 8:59
Hamid_RT13-Jun-07 8:59 
Questionhelp with WM_KEYDOWN Pin
Sam Rens12-Jun-07 21:50
Sam Rens12-Jun-07 21:50 
AnswerRe: help with WM_KEYDOWN Pin
Nelek12-Jun-07 23:28
protectorNelek12-Jun-07 23:28 
GeneralRe: help with WM_KEYDOWN Pin
Sam Rens13-Jun-07 0:16
Sam Rens13-Jun-07 0:16 
GeneralRe: help with WM_KEYDOWN Pin
Nelek13-Jun-07 7:36
protectorNelek13-Jun-07 7:36 
Sorry if you thought I was laughing or pissing you off. I will help you as long as I can.

The first thing. Your programm is writting the output to a file continuosly because you have all the code in the loop of messages in the OnPaint. So it will be executed every time the window updates.

I don't know the structure of the OnKeyDown programming all as you make, but using win32 under VC++ the function is:

afx_msg void OnKeyDown( UINT nChar, UINT nRepCnt, UINT nFlags );


You can switch the UINT nChar and look which is the key pressed (VK_RETURN, VK_ESC, VK_F1, VK_DELETE...) and call the function you want or execute the code you need.

I'm not sure if you can check (according to your code) the WM_KEYDOWN and take the parameters directly there. But you can try to emulate the function of MFC and when it is called then make the other switch to select the key.

Sorry if it doesn't help you very much. But at least you have an idea to continue looking for the solution.



Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

QuestionVC++ Pin
srinivasa phani kiran12-Jun-07 21:47
srinivasa phani kiran12-Jun-07 21:47 
AnswerRe: VC++ Pin
Naveen12-Jun-07 21:57
Naveen12-Jun-07 21:57 
AnswerRe: VC++ Pin
Nelek12-Jun-07 23:25
protectorNelek12-Jun-07 23:25 
QuestionGDI & Image Processing Pin
KienNT7812-Jun-07 21:05
KienNT7812-Jun-07 21:05 
AnswerRe: GDI & Image Processing Pin
CPallini12-Jun-07 21:23
mveCPallini12-Jun-07 21:23 
AnswerRe: GDI & Image Processing Pin
Nelek12-Jun-07 23:22
protectorNelek12-Jun-07 23:22 
Questionproblem in file open dialog box Pin
trioum12-Jun-07 20:57
trioum12-Jun-07 20:57 
AnswerRe: problem in file open dialog box Pin
Hamid_RT12-Jun-07 21:30
Hamid_RT12-Jun-07 21:30 
AnswerRe: problem in file open dialog box Pin
trioum13-Jun-07 1:26
trioum13-Jun-07 1:26 
GeneralRe: problem in file open dialog box Pin
Hamid_RT13-Jun-07 3:34
Hamid_RT13-Jun-07 3:34 
QuestionUsing OpenGL Text Output with DIB Section Pin
beko12-Jun-07 20:37
beko12-Jun-07 20:37 
QuestionNeWbie Rook Programmer! Pin
brandonsjo12-Jun-07 20:36
brandonsjo12-Jun-07 20:36 
AnswerRe: NeWbie Rook Programmer! Pin
Hamid_RT12-Jun-07 21:30
Hamid_RT12-Jun-07 21:30 
AnswerRe: NeWbie Rook Programmer! Pin
Nelek12-Jun-07 23:18
protectorNelek12-Jun-07 23:18 
QuestionCDialog Pin
Bravoone_200612-Jun-07 20:29
Bravoone_200612-Jun-07 20:29 
AnswerRe: CDialog Pin
Hans Dietrich12-Jun-07 20:54
mentorHans Dietrich12-Jun-07 20:54 
QuestionRe: CDialog Pin
Bravoone_200612-Jun-07 21:40
Bravoone_200612-Jun-07 21:40 

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.