Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CEdit : Detect the VK_ENTER , VK_TAB+, VK_LF from a string

Status
Not open for further replies.

youssef

Programmer
Mar 13, 2001
96
BE
Hi,

I receive from a Barcode Reader a string with a end of message character LF, TAB+, ENTER, RETURN, CR/LF in an editbox.

For example : *B00001*+<CR> or *B00001*+<ENTER>, ...

When I receive the string and the End of Message is RETURN, CR, ENTER, the program is closed. Ok I use Pretranslate Message for inhibit.

But when I would like to use TAB+ or LF nothing. I listen a BEEP.

My question is :

I would like when the Editbox detect the End of Message from the Barcode Reader, I execute a command.

Best Regards,
 
Well the cheap way is to call SendMessage within the message loop when you catch a WM_KEYDOWN. ie:

while(GetMessage(&msg, NULL, 0, 0) > 0) {
//...
if(msg.message == WM_KEYDOWN) {
SendMessage(msg.hwnd,
msg.message,
msg.wParam,
msg.lParam);
}
}


Still better, look up subclassing techniques, a much more permanant solution to &quot;the message problem&quot;. Are you using C or C++?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top