469,649 Members | 1,177 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,649 developers. It's quick & easy.

another MFC modeless dialog question

Hi,

i was finally able to get my modeless dialog box to work, but a new problem
did arise.

i have implemented the dialog box in a dll that is called by a command line
application that is native win32
without a message pump.

if i show the dialog modal, it works fine.
if i show if modeless, it is visible, but i cannot do anything with it, and
the cursor changes to the timer cursor.
it seems as if the window accepts no messages.

does anyone know what the problem could be, and how i can solve it?

kind regards,
Bruno.
Nov 17 '05 #1
1 2700
"Bruno van Dooren" <mi******@hotmail.com> wrote in message
news:ec**************@TK2MSFTNGP11.phx.gbl...
i have implemented the dialog box in a dll that is called by a command line application that is native win32
without a message pump.

if i show the dialog modal, it works fine.
I should tell you that I don't know much about MFC.

Neverthless, true modal dialog boxes spin their own message pumps with code
like this

while ( GetMessage(&msg, NULL, 0, 0) )
{
TranslateMessge(&msg);
DispatchMessage(&msg);
}
if i show if modeless, it is visible, but i cannot do anything with it, and the cursor changes to the timer cursor.
it seems as if the window accepts no messages.


No, _it_ accepts the messages. _You_ are not processing them. You, or MFC
code that you cause to run, needs to retrieve messages, check to see if they
are destined for a modeless dialog with IsDialogMessage() and if not
translate and dispatch as above.

Regards,
Will

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by vince | last post: by
1 post views Thread by Carmine | last post: by
reply views Thread by Andrew | last post: by
1 post views Thread by andrew | last post: by
2 posts views Thread by proit_123 | last post: by
8 posts views Thread by proit_123 | last post: by
3 posts views Thread by DoB | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.