Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

senddmessage

Posted on 1997-04-17
1
Medium Priority
?
221 Views
Last Modified: 2013-12-04
for mikeblas.

i want to send the following keystrokes from my application to netscape in order to make netscape go home.


1. alt
2. g
3. h

i tried it with:  SendMessage but i do not know

what i am doing wrong.

i work under win95 with bc++4.5.
0
Comment
Question by:stephan papadakis
1 Comment
 

Accepted Solution

by:
seg earned 150 total points
ID: 1334626
i take it you want to send the Alt-g to bring down the Go submenu and then the h to select the Home subitem. if this were to work at all (which it may not), you'd have to send at least 2 messages. possible solutions:

SendMessage(hWnd, WM_SYSKEYDOWN, VK code for g, ???);
SendMessage(hWnd, WM_KEYDOWN, VK code for h, ???);

SendMessage(hWnd, WM_SYSCHAR, Ansii code for g, ???);
SendMessage(hWnd, WM_CHAR, Ansii code for h, ???);

the reason there are 2 is because to accomplish what you want requires 2 steps: bring down the Go submenu, select an item off that submenu.

another thing you might try is just send a WM_COMMAND with the menu id of the Home item (which you can get by running Spy++)..
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question