🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #15038

Re: Sending several keystrokes to a window via keybd_event( )

#15038
From: Remy Lebeau (TeamB)
Date: Tue, 22 Jul 2003 21:51
24 lines
1851 bytes
"Oren (Halvani.de)" <neroniker@gmx.de> wrote in message
news:3f1daedc@newsgroups.borland.com...

> keybd_event('VK_BACK',0,0,0); // ---> only one parameter is allowed !!
>
> where can I put the other keystrokes ??

You have to make multiple calls to keybd_event(), one for each key, and one
for each individual KeyDown and KeyUp action as well.  For example:

    keybd_event(VK_CONTROL, 0, 0, 0);
    keybd_event('C', 0, 0, 0);
    keybd_event('C', 0, KEYEVENTF_KEYUP, 0);
    keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0);

> For example I got a combination of "CTRL + C"
> (copy action) and directly after it a "CTRL + V" (past action)

Why not just send WM_COPY and WM_PASTE messages to the foreground window
instead?


Gambit
Technical Details
Message-ID: <3f1db0aa$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!logbridge.uoregon.edu!kibo.news.demon.net!demon!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f1daedc@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,5f450e96226173c8
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-22 15:09:50 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f1daedc@newsgroups.borland.com>
Subject: Re: Sending several keystrokes to a window via keybd_event( )
Date: Tue, 22 Jul 2003 14:51:52 -0700
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3f1db0aa$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1058910378 207.175.226.26 (22 Jul 2003 14:46:18 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!logbridge.uoregon.edu!kibo.news.demon.net!demon!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail