M
mo A
Hi all,
i am writing an App that reads from a barcode scanner. (no output
statments,i.e no active window)
i want to find a way to send the barcode to an open window (such as
Internet Explorer) so that when the user scans the barcode, the result
is displayed in any text box the user clicked. (the user has to click
on that text box --set focus-- before he triggers the barcode scanner)
i was looking into PostMessage(HWND_BROADCAST,WM_KEYDOWN,barocde,0).
but wasn't working.
i also tried PostMessage(GetForegroundWindow(),WM_KEYDOWN,barocde,0).
but wasn't working either.
my APP is a console app, no output statements (so a windows is not
created)
Any idea?
the window name is non constant so i cannot use
FindWindow( LPCTSTR lpClassName, LPCTSTR lpWindowName );
i looked into using EnumWindows() to get a handle to all active windows,
but how can i implement that ? (especially the call back function)?
Your help is greatly appreciated
Thanks
Mo
(e-mail address removed)
i am writing an App that reads from a barcode scanner. (no output
statments,i.e no active window)
i want to find a way to send the barcode to an open window (such as
Internet Explorer) so that when the user scans the barcode, the result
is displayed in any text box the user clicked. (the user has to click
on that text box --set focus-- before he triggers the barcode scanner)
i was looking into PostMessage(HWND_BROADCAST,WM_KEYDOWN,barocde,0).
but wasn't working.
i also tried PostMessage(GetForegroundWindow(),WM_KEYDOWN,barocde,0).
but wasn't working either.
my APP is a console app, no output statements (so a windows is not
created)
Any idea?
the window name is non constant so i cannot use
FindWindow( LPCTSTR lpClassName, LPCTSTR lpWindowName );
i looked into using EnumWindows() to get a handle to all active windows,
but how can i implement that ? (especially the call back function)?
Your help is greatly appreciated
Thanks
Mo
(e-mail address removed)