Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

senddmessage

Posted on 1997-04-17
1
Medium Priority
?
220 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 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
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 this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

670 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