🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Fill notepad's keyboard buffer with some stuff

#9916
From: Gintaras Kekys
Date: Mon, 07 Jun 2004 07:05
27 lines
1659 bytes
I get it,- I have to use EnumChildWindows and find a child window to forward
input to.


> I have enummed windowses with EnumWindows, got notepad.exe window handle
and
> tried to fill it's keyboard buffer with some stuff:
>
> static bool __stdcall EnumWindowCallBack(HWND hwnd, LPARAM lParam)
> {
>   bool bRet;
>   char caption[32];
>   char SomeStuff[32];
>
>   bRet=true;
>
>   StrCopy(SomeStuff,"Filled notepad with some stuff");
>   SendMessage( hwnd, WM_GETTEXT, 32, (LPARAM)caption);
>
>   if (StrLIComp(caption, "untitled - notepad", 18) == 0 ) {
>      for(int i=0;i<strlen(SomeStuff);i++)
>         SendMessage(hwnd,WM_CHAR,SomeStuff[i],0);
>      bRet=false;
>      }
>
>   return bRet;
> }
Technical Details
Message-ID: <40c41381$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsrout1.ntli.net!news-in.ntli.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40c3fde9@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,925db27f4edb396d
X-Google-Attributes: gid10cc67,public
Reply-To: "Gintaras Kekys" <gintaras-erasethis@sb.lt>
From: "Gintaras Kekys" <gintaras-erasethis@sb.lt>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40c3fde9@newsgroups.borland.com>
Subject: Re: Fill notepad's keyboard buffer with some stuff
Date: Mon, 7 Jun 2004 10:05:31 +0300
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2739.300
NNTP-Posting-Host: 213.190.40.141
Message-ID: <40c41381$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1086591873 213.190.40.141 (7 Jun 2004 00:04:33 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsrout1.ntli.net!news-in.ntli.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail