Solved

senddmessage

Posted on 1997-04-17
1
207 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 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now