Post message from modal dialog to modeless dialog box....urgent!!!!!!!!!!!!!!1 
Author Message
 Post message from modal dialog to modeless dialog box....urgent!!!!!!!!!!!!!!1

Hi ,
1.I am having a modeless dialog box(1).
2.On that modeless dialog box i am having a button.
3.On the click of button i am calling a modal dialog box(2).
4.On the modal dialog box there is a button.on the click of this
button i am trying to send user defined messages to the dialog box
(1).
However i found that the messages are never received by the dialog box
(1).
Could anybody please help me in finding a solution for this...

regards
debs



Sun, 05 Dec 2004 16:22:27 GMT  
 Post message from modal dialog to modeless dialog box....urgent!!!!!!!!!!!!!!1
Debs,
        By what are you judging that the messages are never received?  
Have you put TRACE statements in the handlers for the messages?  How did
you declare the message handlers?  Did you remember to put ON_MESSAGE
entries in the message map?


Sun, 05 Dec 2004 23:09:50 GMT  
 Post message from modal dialog to modeless dialog box....urgent!!!!!!!!!!!!!!1
User defined messages are private messages. They are posted to the owning
window only.
Try using ::PostMessage with HWND_BROADCAST as the first parameter.
I had a similar problem and it worked.



Quote:
> Debs,
> By what are you judging that the messages are never received?
> Have you put TRACE statements in the handlers for the messages?  How did
> you declare the message handlers?  Did you remember to put ON_MESSAGE
> entries in the message map?



Tue, 07 Dec 2004 06:34:52 GMT  
 Post message from modal dialog to modeless dialog box....urgent!!!!!!!!!!!!!!1
???

Messages are sent or posted to the window to which you direct them.  No
window "owns" a message.  There's a sender and a receiver.  In the case
of HWND_BROADCAST, Windows makes ALL top-level windows the receiver.  
Unless you are intending for multiple, unspecified windows to handle
your user message, broadcast is not an appropriate solution.



Tue, 07 Dec 2004 13:08:14 GMT  
 Post message from modal dialog to modeless dialog box....urgent!!!!!!!!!!!!!!1
Is there something wrong in what I said? or is it unclear?


Quote:
> ???

> Messages are sent or posted to the window to which you direct them.  No
> window "owns" a message.  There's a sender and a receiver.  In the case
> of HWND_BROADCAST, Windows makes ALL top-level windows the receiver.
> Unless you are intending for multiple, unspecified windows to handle
> your user message, broadcast is not an appropriate solution.



Wed, 08 Dec 2004 06:03:13 GMT  
 Post message from modal dialog to modeless dialog box....urgent!!!!!!!!!!!!!!1
I believe your advice was incorrect, for the reasons I posted last.  
However, there's always the possibility that I just misunderstood you.


Wed, 08 Dec 2004 13:06:08 GMT  
 Post message from modal dialog to modeless dialog box....urgent!!!!!!!!!!!!!!1
Yup,
Thanks for the corrections.


Quote:
> I believe your advice was incorrect, for the reasons I posted last.
> However, there's always the possibility that I just misunderstood you.



Thu, 09 Dec 2004 09:30:05 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Modeless dialog box together with modal dialog box

2. Modeless Dialog box in a Modal Dialog Application...

3. MAPI Modal Dialog Box instead of Modeless

4. Modal to Modeless dialog box

5. Modeless dialog called from Modal dialog woes.

6. Modeless Dialog from Modal Dialog question ?

7. Modeless dialog on top of Modal dialog

8. Modeless Child Dialog of Modal Dialog

9. Urgent : Tool Tip in Modeless Dialog boxes......

10. Modal dialog or message box causes exception

11. Modal dialog boxes and windows messages

12. PBM: Message box not displayed after main dialog box is closed in MFC dialog-based app

 

 
Powered by phpBB® Forum Software