C
Christopher Pragash
Hello All,
I am working on a Pocket PC 2003 device with a keyboard built into it. My
requirement is to capture key press events on each control (textbox,
checkbox, list box, etc). I tried capturing the OnKeyDown event for each
control, but could not achieve the behavior I expected - the up and down
arrow key presses were not captured using this event for check boxes. My
next approach was to intercept win32 messages - based on the article
http://msdn.microsoft.com/msdnmag/issues/04/04/KeyboardSupport/default.aspx
/ another source is the Yao Durant compact .net programming book chapter 9
which has a similar sample, but on both the samples I had the same problem.
The control is able to intercept key messages - but it looses properties
such as text values or checked values etc. A simple textbox1.text shows up a
blank value where as the designer shows the textbox with a value "Textbox1".
I narrowed down the problem to a specific function call - the control losses
its properties when a handle of that window is passed to a native dll
interceptor written in MFC or C++. Any thoughts or suggestions would be
really really helpful.
Thanks in advance.
Regards,
Chris
I am working on a Pocket PC 2003 device with a keyboard built into it. My
requirement is to capture key press events on each control (textbox,
checkbox, list box, etc). I tried capturing the OnKeyDown event for each
control, but could not achieve the behavior I expected - the up and down
arrow key presses were not captured using this event for check boxes. My
next approach was to intercept win32 messages - based on the article
http://msdn.microsoft.com/msdnmag/issues/04/04/KeyboardSupport/default.aspx
/ another source is the Yao Durant compact .net programming book chapter 9
which has a similar sample, but on both the samples I had the same problem.
The control is able to intercept key messages - but it looses properties
such as text values or checked values etc. A simple textbox1.text shows up a
blank value where as the designer shows the textbox with a value "Textbox1".
I narrowed down the problem to a specific function call - the control losses
its properties when a handle of that window is passed to a native dll
interceptor written in MFC or C++. Any thoughts or suggestions would be
really really helpful.
Thanks in advance.
Regards,
Chris