🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

keybd_event(...) or a way to do Edit-Paste

#16432
From: David Goodman
Date: Mon, 12 May 2003 20:39
21 lines
1456 bytes
Hi,

I have a program that runs Paint (..\System32\mspaint.exe)
and then pastes a graph I have in the Windows Clipboard
to it.   I am using:

hWnd=FindWindow("MSPaintApp", NULL);
BringWindowToTop(hWnd);

an then keybd_event(...); to push
keys in Paint's menu (Edit-Paste) but this method
doesn't work well sometimes, also if Paint's menu
is in other language other than English it
won't work. 

Is there other direct way to do this with APIs?

A snip on how to do this would be appreciated.

Dave
Technical Details
Message-ID: <3ec00699$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,730a5f17c04cd169,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-05-12 14:09:18 PST
From: "David Goodman" <dgoodman@nospam.com>
Sender: "David Goodman" <dgoodman@nospam.com>
Reply-To: "David Goodman" <dgoodman@nospam.com>
Subject: keybd_event(...) or a way to do Edit-Paste
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 67.31.157.173 67.31.157.173    
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3ec00699$1@newsgroups.borland.com>
Date: 12 May 2003 13:39:53 -0700
X-Trace: newsgroups.borland.com 1052771993 207.105.83.65 (12 May 2003 13:39:53 -0700)
Lines: 23
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail