Article View: borland.public.cppbuilder.nativeapi
Article #9018Re: Righ click on application button and select [Restore,Move,Size,Minimize,Maximize,Close]
From: Remy Lebeau (TeamB)
Date: Tue, 17 Aug 2004 16:28
Date: Tue, 17 Aug 2004 16:28
16 lines
1639 bytes
1639 bytes
<zoom> wrote in message news:41220535@newsgroups.borland.com... > How we can perform [Restore,Move,Size,Minimize,Maximize,Close] > operations on an application defined by name or process ID? Send WM_SYSCOMMAND messages to the desired window. You have to find the window first, though. If by "application name" you mean the window title, then you can use FindWindow() for that. As for the process ID, that is a bit trickier, particularly since a process can have multiple windows. You will have to use EnumWindows() and GetWindowThreadProcessId() to find all windows that belong to a given process ID, and then you can pick your desired window from that list of windows as needed. Gambit
Technical Details
Message-ID:
<412231f8@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41220535@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,9acd9493b06d9f0b X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <41220535@newsgroups.borland.com> Subject: Re: Righ click on application button and select [Restore,Move,Size,Minimize,Maximize,Close] Date: Tue, 17 Aug 2004 09:28:34 -0700 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <412231f8@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1092760056 68.69.17.41 (17 Aug 2004 09:27:36 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail