Message Filters & ShowDialog

S

Stelrad Doulton

Hi,

Using OpenNETCF's ApplicationEx and registering on system power events I
have written a small message filter class to consume the first
WM_LBUTTONDOWN after going into system idle. It seemed to work great but I
have released that if a form is being shown modally at the time of going
into system idle then I am not consuming the message and my filter does not
work. I believe that when a form is being shown modally it has it's own
message loop and this is causing the problem. My question is, how can I
apply my filter to all modal forms within the application?

Cheers
 
S

Sergey Bogdanov

The Form.ShowDialog has its own message loop, hence there is no way to
forward IMessageFilter to this loop. What I could suggest you is to
download the latest SDF. In the ApplicationEx class I have implemented
the ShowDialog method which opens a form in the modal message loop
without IMessageFilter ignorance.

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
 
S

Stelrad Doulton

Great! I was just about to get down and dirty in ApplicationEx V 1.2!!

Thanks both.
 

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