-
PostMessage to child
Hi,
I am having a dialog-based application containing a property sheet. each tab corresponds to a dialog class implementing some controls. on one of the tabs, there is a button calling a third dialog (modal).
Now, I have a recursive function which is supposed to show something in the third dialog. So, I have to pass some data from the original dialog class (of the project) to the third dialog. But the message handling function in the third dialog is never called.
I tried to use
GetForegroundWindow()->PostMessage(MYMESSAGE, 0,0);
and:
::PostMessage(GetActiveWindow()->m_hWnd,MYMESSAGE,0,0);
but it doesn't work.
Any other idea?
Thanks in advance
radu
-
Re: PostMessage to child
well the problem was that the dialog wasn't yet created. Still it wouldn't work with a modal dialog because the PostMessage code in the main dialog would never be executed.