Article View: borland.public.cppbuilder.nativeapi
Article #16442Re: keybd_event(...) or a way to do Edit-Paste
From: JD
Date: Tue, 13 May 2003 13:57
Date: Tue, 13 May 2003 13:57
26 lines
1914 bytes
1914 bytes
"David Goodman" <dgoodman@nospam.com> wrote: > [...] 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? As best as I can tell, you can't do it the way that you're looking at with using APIs without knowing more about the internals of Paint. Someone in the graphics news group might be able to help you with this. There are however 2 other options that come to mind. The first is to save the image to disk and pass the filename to Paint so that it loads it on startup. The second is just an idea that may not be do-able - to use API calls to access the Menus (assuming that they will always be the same or at least consistant enough to be able to determine that you're looking at the correct menu item) and then determine the key sequence to push or simulate mouse clicks on the desired menu item. ~ JD
Technical Details
Message-ID:
<3ec0f9c0$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3ec00699$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,730a5f17c04cd169 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-05-13 07:02:12 PST From: "JD" <nospam@nospam.com> Sender: "JD" <nospam@nospam.com> Reply-To: "JD" <nospam@nospam.com> Subject: Re: keybd_event(...) or a way to do Edit-Paste Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 172.156.254.86 172.156.254.86 References: <3ec00699$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.65 Message-ID: <3ec0f9c0$1@newsgroups.borland.com> Date: 13 May 2003 06:57:20 -0700 X-Trace: newsgroups.borland.com 1052834240 207.105.83.65 (13 May 2003 06:57:20 -0700) Lines: 27 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail