Click here to Skip to main content
15,901,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: print in the list box [modified] Pin
sunit51-Aug-06 4:49
sunit51-Aug-06 4:49 
GeneralRe: print in the list box Pin
Naveen1-Aug-06 18:49
Naveen1-Aug-06 18:49 
QuestionRegular expressions code generator Pin
Alexander M.,31-Jul-06 13:06
Alexander M.,31-Jul-06 13:06 
AnswerRe: Regular expressions code generator Pin
John R. Shaw31-Jul-06 15:55
John R. Shaw31-Jul-06 15:55 
Questionexternal variables for C and C++ mixed program Pin
zhijia.yuan31-Jul-06 12:14
zhijia.yuan31-Jul-06 12:14 
AnswerRe: external variables for C and C++ mixed program Pin
Taka Muraoka31-Jul-06 15:00
Taka Muraoka31-Jul-06 15:00 
GeneralRe: external variables for C and C++ mixed program Pin
zhijia.yuan1-Aug-06 9:44
zhijia.yuan1-Aug-06 9:44 
QuestionA question about postmessage. [modified] Pin
zhijia.yuan31-Jul-06 12:11
zhijia.yuan31-Jul-06 12:11 
i have a program like this:
main app is CMyApp ::CWinApp

i give an ID for a button on the main window:
ID_MY_BUTTON

i want to handle the click message in CWinApp's member function
so i mapped the message as:
ON_COMMAND(ID_MY_BUTTON, OnMyButton);

and write the code for the function
actually it works very well
but the question comes up when i tried this:
::postmessage(hMainWnd, ID_MY_BUTTON,Null,Null)

i used hMainWnd because i believe the message mapping net can automatically send the message to the main thread.
but, finally, i found this does not cause the OnMyButton to be called.

i also tried this one:
::PostMessage(hMainWnd, WM_COMMAND, ID_MY_BUTTON, 0)

but it still doesn't work Frown | :(

so, how should i send this ID_MY_BUTTON message so that the main thread can handle it?

thanks alot!


-- modified at 18:11 Monday 31st July, 2006
AnswerRe: A question about postmessage. Pin
User 58385231-Jul-06 17:13
User 58385231-Jul-06 17:13 
GeneralRe: A question about postmessage. Pin
zhijia.yuan1-Aug-06 9:45
zhijia.yuan1-Aug-06 9:45 
QuestionGetting the hStdOutput from CreateProcess.hStdOutput [modified] Pin
darkcloud.42o31-Jul-06 11:17
darkcloud.42o31-Jul-06 11:17 
AnswerRe: Getting the hStdOutput from CreateProcess.hStdOutput Pin
James Brown31-Jul-06 11:43
James Brown31-Jul-06 11:43 
GeneralRe: Getting the hStdOutput from CreateProcess.hStdOutput [modified] Pin
darkcloud.42o31-Jul-06 12:10
darkcloud.42o31-Jul-06 12:10 
QuestionAdding member variables crashes app Pin
Wheatbread31-Jul-06 9:49
Wheatbread31-Jul-06 9:49 
AnswerRe: Adding member variables crashes app Pin
Chris Losinger31-Jul-06 9:57
professionalChris Losinger31-Jul-06 9:57 
GeneralRe: Adding member variables crashes app Pin
Wheatbread31-Jul-06 10:34
Wheatbread31-Jul-06 10:34 
AnswerRe: Adding member variables crashes app Pin
Hans Dietrich31-Jul-06 10:02
mentorHans Dietrich31-Jul-06 10:02 
GeneralRe: Adding member variables crashes app Pin
Wheatbread31-Jul-06 10:35
Wheatbread31-Jul-06 10:35 
AnswerRe: Adding member variables crashes app Pin
Zac Howland31-Jul-06 10:13
Zac Howland31-Jul-06 10:13 
GeneralRe: Adding member variables crashes app Pin
Wheatbread31-Jul-06 10:37
Wheatbread31-Jul-06 10:37 
GeneralRe: Adding member variables crashes app [modified] Pin
Zac Howland31-Jul-06 10:47
Zac Howland31-Jul-06 10:47 
GeneralRe: Adding member variables crashes app Pin
Wheatbread31-Jul-06 11:06
Wheatbread31-Jul-06 11:06 
GeneralRe: Adding member variables crashes app Pin
Zac Howland31-Jul-06 11:14
Zac Howland31-Jul-06 11:14 
GeneralRe: Adding member variables crashes app Pin
Wheatbread1-Aug-06 12:28
Wheatbread1-Aug-06 12:28 
GeneralRe: Adding member variables crashes app Pin
Zac Howland1-Aug-06 17:07
Zac Howland1-Aug-06 17:07 

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.