Article View: borland.public.cppbuilder.nativeapi
Article #8937Re: Righ click on application button and select [Restore,Move,Size,Minimize,Maximize,Close]
From: Boba
Date: Thu, 19 Aug 2004 02:34
Date: Thu, 19 Aug 2004 02:34
15 lines
1607 bytes
1607 bytes
<zoom> wrote in message news:412346ef@newsgroups.borland.com...
> ...
> HWND hwnd;
> hwnd=FindWindow("Notepad", NULL);
> if (hwnd != 0) {
> ShowMessage("Notepad is running. Get ready!..");
> file://SendMessage(hwnd,WM_CLOSE,0,0);
> file://SendMessage(hwnd,WM_SYSCOMMAND,SC_MAXIMIZE,0 );
> file://SendMessage(hwnd,WM_SYSCOMMAND,SC_MINIMIZE,0 );
> file://SendMessage(hwnd,WM_SYSCOMMAND,SC_RESTORE,0 );
> file://SendMessage(hwnd,WM_SYSCOMMAND,SC_MOVE,0 );
> SendMessage(hwnd,WM_SYSCOMMAND,SC_SIZE,0 );
> }
>
I would use PostMessage.
Technical Details
Message-ID:
<412410c0@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41220535@newsgroups.borland.com> <412231f8@newsgroups.borland.com> <412346ef@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: "Boba" <Boba@somewhere.world> Newsgroups: borland.public.cppbuilder.nativeapi References: <41220535@newsgroups.borland.com> <412231f8@newsgroups.borland.com> <412346ef@newsgroups.borland.com> Subject: Re: Righ click on application button and select [Restore,Move,Size,Minimize,Maximize,Close] Date: Wed, 18 Aug 2004 21:34:29 -0500 Lines: 17 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 NNTP-Posting-Host: 208.210.156.15 Message-ID: <412410c0@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1092882624 208.210.156.15 (18 Aug 2004 19:30:24 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail