Help me with SendMessage to send ALT+Key
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.win32 only
 
Advanced search
POPULAR GROUPS

more...

comp.os ... win32 Profile…
 Up
Help me with SendMessage to send ALT+Key         


Author: Nhoc
Date: May 11, 2008 16:11

I have try to use this:

AnsiString strWindowName = "Element Client";
HWND windowHandle = FindWindow(0, strWindowName.c_str());
if (windowHandle)
{
SendMessage(windowHandle, WM_SYSKEYDOWN,0x12,0x20380001);
SendMessage(windowHandle, WM_SYSKEYDOWN,0x33,0x20040001);
SendMessage(windowHandle, WM_SYSCHAR,0x33,0x20040001);
SendMessage(windowHandle, WM_KEYUP,0x12,0xc0380001);
SendMessage(windowHandle, WM_KEYUP,0x33,0xc0040001);
}

But nothing happen

If i hold ALT when that code run, i'll effect, i think maybe that code cant
force event ALT hold key down.

Can someone help me.

PS: I cant use Key_bd() because sometime i'll hide that application (not
active)
1 Comment
Re: Help me with SendMessage to send ALT+Key         


Author: Christian ASTOR
Date: May 17, 2008 03:52

Nhoc wrote:
> I have try to use this:
>
> AnsiString strWindowName = "Element Client";
> HWND windowHandle = FindWindow(0, strWindowName.c_str());
> if (windowHandle)
> {
> SendMessage(windowHandle, WM_SYSKEYDOWN,0x12,0x20380001);
> SendMessage(windowHandle, WM_SYSKEYDOWN,0x33,0x20040001);
> SendMessage(windowHandle, WM_SYSCHAR,0x33,0x20040001);
> SendMessage(windowHandle, WM_KEYUP,0x12,0xc0380001);
> SendMessage(windowHandle, WM_KEYUP,0x33,0xc0040001);
> }
>
> But nothing happen
>
> If i hold ALT when that code run, i'll effect, i think maybe that code cant
> force event ALT hold key down.
>
> Can someone help me. ...
Show full article (0.91Kb)
no comments

RELATED THREADS
SubjectArticles qty Group
Re: snizavanje secera u krvi (crossp. hr.alt.med, alt.vegeterijanstvo, fido.kuhinje)hr.alt.med ·