🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

EnumWindows etc.

#1930
From: Matthew
Date: Fri, 08 Jun 2007 04:20
31 lines
1636 bytes
Hi all:

I suck at the API calls... and I need a little help here. I 
have used Enum to get a list of available windows (and procs).
I just want the apps running in the list, but I don't know how 
to differentiate.

The example that came with BCB6:
if(hWnd==NULL)
      return false;

   hg = GlobalAlloc(GMEM_SHARE,sizeof(unsigned long));
   pPid = (unsigned long *)GlobalLock(hg);

   result = GetWindowThreadProcessId(hWnd,pPid);

   if(result){
...etc

Once I have the list, I need to be able to select an app, and
bring it to focus... so if it is minimized to the task bar, how
do I select (code) within my program to maximize it?

Thanks for any help. And if you can tell me how to weed out the
processes and just display the programs on the task bar, that
would also be a great help.

Appreciates all around.

M.
Technical Details
Message-ID: <4668d902$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,859e738ad5fa0eae,start
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Matthew" <atomkey@yahoo.com>
Sender: "Matthew" <atomkey@yahoo.com>
Reply-To: "Matthew" <atomkey@yahoo.com>
Subject: EnumWindows etc.
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 74.196.1.72     
NNTP-Posting-Host: 207.105.83.66
Message-ID: <4668d902$1@newsgroups.borland.com>
Date: 7 Jun 2007 21:20:18 -0700
X-Trace: newsgroups.borland.com 1181276418 207.105.83.66 (7 Jun 2007 21:20:18 -0700)
Lines: 31
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail