Message Filters & ShowDialog

  • Thread starter Thread starter Stelrad Doulton
  • Start date Start date
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
 
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
 
Great! I was just about to get down and dirty in ApplicationEx V 1.2!!

Thanks both.
 
Back
Top