R
RB0135
Hi All,
I am writing a C# app for a Windows CE5 device that has a barcode
scanner built into it (a CypherLabs 9400).
To get the info from the barcode scanned, the programming manual
states to setup a RegisterWindowMessage call and I have have done this
code:
uint nDecodeMsg = RegisterWindowMessage("WM_DECODEDATA");
I have done that without issues, but for the life of me, how do you
know when a message is present.
I have tried to look at some examples and one example mentioned to use
something like this:
protected override void WndProc(ref Message m)
{
//calling the base first is important, otherwise the
values you set later will be lost
base.WndProc(ref m);
//if the window message id equals the nDecodeMsg message
id
if ((UInt32)m.Msg == nDecodeMsg)
{
/* Do Stuff here */
}
}
However, on the first line (ref Message m), the Message throws a
compile error "Type or Namespace Message cannot be found".
I am a total noob in this area (I think I understand C# enough), but
Am I going on the right path?
Is there an actual example of how to set up the "watcher/listner" for
the WindowMessage.
I have looked a lot for examples, but either I am missing the point,
or just cant find the answer..
Any help????
Thanks in advance...
I am writing a C# app for a Windows CE5 device that has a barcode
scanner built into it (a CypherLabs 9400).
To get the info from the barcode scanned, the programming manual
states to setup a RegisterWindowMessage call and I have have done this
code:
uint nDecodeMsg = RegisterWindowMessage("WM_DECODEDATA");
I have done that without issues, but for the life of me, how do you
know when a message is present.
I have tried to look at some examples and one example mentioned to use
something like this:
protected override void WndProc(ref Message m)
{
//calling the base first is important, otherwise the
values you set later will be lost
base.WndProc(ref m);
//if the window message id equals the nDecodeMsg message
id
if ((UInt32)m.Msg == nDecodeMsg)
{
/* Do Stuff here */
}
}
However, on the first line (ref Message m), the Message throws a
compile error "Type or Namespace Message cannot be found".
I am a total noob in this area (I think I understand C# enough), but
Am I going on the right path?
Is there an actual example of how to set up the "watcher/listner" for
the WindowMessage.
I have looked a lot for examples, but either I am missing the point,
or just cant find the answer..
Any help????
Thanks in advance...