Article View: borland.public.cppbuilder.nativeapi
Article #9964Re: Windows message hook
From: Mark Jacobs
Date: Tue, 01 Jun 2004 13:55
Date: Tue, 01 Jun 2004 13:55
17 lines
2002 bytes
2002 bytes
Because you're hooking the Window create event, it may not have set up the dimensions for the window at the time of creation - it may do this afterwards (for example, in onactivate instead). Why not hook the WM_PAINT event instead, and only use the first time it occurs for any given HWND? By the time the window is being painted, the OS really does know how big it is going to be. -- Mark Jacobs DK Computing http://www.dkcomputing.co.uk markj atty critical dotty co dotty uk "Fractal Cat" <pjb@prime-projects.co.uk> wrote in message news:40b784c9$1@newsgroups.borland.com... > Ok. I have set up a global Shell Hook that intercepts theWM_CREATE message > where the HWND for that window is available through WParam or LParam. Now, > when I attempt to get the dimensions of this window this is what I get: > > left = 400; top = 300; right 400; bottomn = 300; clearly something is up but > I don't know what. Can you help?
Technical Details
Message-ID:
<40bc8ad1$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!controlnews3.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40b24ca0@newsgroups.borland.com> <40b73cc6$1@newsgroups.borland.com> <40b784c9$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,2c0d2128b33c6af X-Google-Attributes: gid10cc67,public Reply-To: "Mark Jacobs" <markj atty critical dotty co dotty uk> From: "Mark Jacobs" <markj atty critical dotty co dotty uk> Newsgroups: borland.public.cppbuilder.nativeapi References: <40b24ca0@newsgroups.borland.com> <40b73cc6$1@newsgroups.borland.com> <40b784c9$1@newsgroups.borland.com> Subject: Re: Windows message hook Date: Tue, 1 Jun 2004 14:55:43 +0100 Lines: 19 Organization: DK Computing 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: 81.144.157.8 Message-ID: <40bc8ad1$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1086098129 81.144.157.8 (1 Jun 2004 06:55:29 -0700) Path: arc1-ca.pugleaf.net!controlnews3.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail