::SendMessage(GetSafeHwnd(),WM_ACTION,0,0); ::SendMessage(GetSafeHwnd(),WM_ACTION,0,0); if you want to get the result as you say,you should write like these. when we use postmessage to send the message,the application only send the message to CWnd,then return,the application does not wait for the Command to be carried out. when we use sendmessage to send the message,the appliation return when the command be carried out.If we does not wait for the command to be carried out.The message will be save in the message queue, so the message is FILO,not FIFO zhengyb@nanjing-fnst.com
E
Empty1981
@Empty1981
Posts
-
PostMessage -
Modeless modal CDialogin your button event,you should like this: CMyDialog mydlg=new CMyDialog; mydlg.Create(...); mydlg.Show(); in the class of CMyDialog you should add a function CMyDialog::PostNCDestroy() { delete this; }
-
Menuyour menu is a popup menu or a mainfram menu