Solved

senddmessage

Posted on 1997-04-17
1
214 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
seg earned 50 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
How and where to get Business Intelligence Development Studio? 2 111
Post a good COM tutorial 1 73
Dialogbox API leak? 18 119
Question to Pivot table 1 75
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…

710 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