473,398 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

post message from App to Internet Explorer

Mo
Hi all,
i am writing an App that reads from a barcode scanner.
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,baroc de,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 );

Your help is greatly appreciated

Thanks
Mo
ma******@hotmail.com
Jul 22 '05 #1
2 1727
On 29 Jul 2004 09:15:14 -0700, Mo <ma******@hotmail.com> wrote:
Hi all,
i am writing an App that reads from a barcode scanner.
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,baroc de,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 );

Your help is greatly appreciated

Thanks
Mo
ma******@hotmail.com


Windows programming questions should be asked in a Windows programming
group, such as news:comp.os.ms-windows.programmer.win32. You are off topic
here since this group is about the C++ language.

john
Jul 22 '05 #2
Mo posted:
Hi all,
i am writing an App that reads from a barcode scanner.
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 );

Your help is greatly appreciated

Thanks
Mo
ma******@hotmail.com


OFF TOPIC

Nonetheless:

Make a window of yours the active window. When the user
clicks the other window, your window should receive a
message WM_LOSTFOCUS or something like that. With any luck
I believe it also gives you the HWND of the new window
that's in focus.

SetWindowText(hWnd,"sjfas;ljf");
-JKop
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Peter Kaptein | last post by:
In some applications you see a HTML page in the Web-browser call a DLL instead of a .asp page. The result is HTML presented in the browser. I have seen this working for stand-alone apps as well...
3
by: Tom Asken | last post by:
Short version: IE 6.0 wrongly posts <button ..> value. Internet Explorer should only post the value of the clicked submit button - but IE 6 posts the value of several submit buttons if they have...
7
by: Gianni Rondinini | last post by:
http://tagsoup.com/-dev/null-/css/fixed/ this is what i was looking for. it has the fixed things i wanted and works both with internet explorer and firefox. the problem is i can't reproduce it. i...
3
by: bill | last post by:
Is there a way to log the actual outgoing http post message on a Web Services client? I am calling a Java Web Services. I have to use HTTP POST in my native C++ code. What I can do is writing a C#...
3
by: VK | last post by:
Internet Explorer 7 beta 2 preview CNET Editor review: <http://reviews.cnet.com/Internet_Explorer_7_for_XP_SP2_Beta_2/4505-3514_7-31454661-2.html?tag=nl.e415> Summary (my personal review...
5
by: Jay | last post by:
Hi, Does anyone know if you can do an HTML POST to a plain html file using javascript to receive and parse the parameters, instead of using asp, php, or a plain-old cgi program? Thanks, Jay
1
by: ministry | last post by:
when i try to open an attachment of MS word, in internet explorer following error occured, Error Message internet explorer was not open this internet site. the request site is either unavailable or...
4
by: =?Utf-8?B?amlsbGllMTk3NA==?= | last post by:
hi getting these messages can not connec through http can not connect through https dns error 0x8007273d
15
by: moltendorf | last post by:
I have created a little chat application that seems to work 100% on Mozilla Firefox, Google Chrome, and Safari, (tried it in Opera, and it seems to work, but the cookies are screwing everything up;...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.