.NET CF on Windows CE - problem with filtering system messages
Posted
by
mack369
on Stack Overflow
See other posts from Stack Overflow
or by mack369
Published on 2011-01-10T15:50:34Z
Indexed on
2011/01/10
15:53 UTC
Read the original article
Hit count: 316
Hello, I'm trying to get every windows message that tells that the user has touched the screen. It works everywhere, except the button, when it is disabled. It seems that the application doesn't get any message when clicked on disabled control.
I'm using OpenNetCF Application2 class for filtering messages:
Application2.AddMessageFilter(Device.PowerManager);
Application2.Run(new MainForm());
PowerManager class contains a following method (as required by IMessageFilter interface):
public bool PreFilterMessage(ref Microsoft.WindowsCE.Forms.Message m)
{
log.DebugFormat("windows message {0} - 0x{0:X}", m.Msg);
if (m.Msg == 0x0201 || m.Msg == 0x8001 || m.Msg == 0x0005)
{
return this.ResetPowerManager();
}
return false;
}
in the log file there is no indication of a windows message when clicking on disabled button. I'm wondering how is it possible and how can I get this message.
© Stack Overflow or respective owner