Article View: borland.public.cppbuilder.nativeapi
Article #4727Re: find out when a window is changing its pos or size
From: Remy Lebeau (TeamB)
Date: Wed, 14 Dec 2005 20:11
Date: Wed, 14 Dec 2005 20:11
23 lines
1983 bytes
1983 bytes
"Jeff Kish" <jeff.kish@mro.com> wrote in message news:86d0q1puc7faipt9t10s9d4dd1vot4vfki@4ax.com... > I need to know if it is possible to have windows tell me (register > my interest somehow) in when a window is changing its size or > pos, being min or maxed. Of course it is possible But how you do that exactly depends on whether the window you are interested in belongs to your application or not. If it does, then you can simply subclass the window directly to intercept the WM_MOVE, WM_MOVING, WM_SIZE, WM_SIZING, WM_WINDOWPOSCHANGING and/or WM_WINDOWPOSCHANGED message. If it does not, then you need to use SetWindowsHookEx() to install a global hook. The hook must be in a DLL so that it can be injected into all running processes. If you set a WH_CBT hook, you can receive HCBT_MINMAX and HCBT_MOVESIZE notifications. Or if you set a WH_CALLWNDPROC or WH_CALLWNDPROCRET hook to intercept the above window messages. Gambit
Technical Details
Message-ID:
<43a07ca8$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<86d0q1puc7faipt9t10s9d4dd1vot4vfki@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,e334b2c316ca4f3b X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <86d0q1puc7faipt9t10s9d4dd1vot4vfki@4ax.com> Subject: Re: find out when a window is changing its pos or size Date: Wed, 14 Dec 2005 12:11:29 -0800 Lines: 25 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: <43a07ca8$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1134591144 68.69.17.41 (14 Dec 2005 12:12:24 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail