ApplicationEx & modal dialog

L

Lloyd Dupont

I have "modal" dialog in my application.

IN fact as I had problem with ShowDialog() they are not dialog but simple
top level control with a loop calling DoEvent() in their showing method.

I'm using ApplicationEx and I would like to improve that.
When I show the control I could find it's HWND.
later on I want to filter all message whose HWND are not the dialog's HWND
or a child, or sub child, or sub sub sub... child control.

is there any way (simple if possible) to do that ?
 
C

Chris Tacke, eMVP

The new dialog simply needs it's own, new message pump. I'd have to look at
the code, but my guess is that you need to use another ApplicationEx.Run for
the "modal" dialog. Maybe we at OpenNETCF should consider a replacement
ShowDialog() method that implements this. You're welcome to try it and let
us know how you fare.

-Chris
 
L

Lloyd Dupont

yep, I understood.
my problem is my little dialog could have a few child controls.
therefore in my message pump the MSG.HWnd could have multiple value, (right
?)

my concern is how could I know if a give msg.HWnd is the handle of a child
control of some other control with a given handle ?

a way to walk the handles of the control hierarchy with some win32 calls ..
anyway that becaome a bit clearer .. I have to look at the win32 API, I
think I could manage ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top