🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Positioning the SHBrowseForFolder window

#4213
From: JD
Date: Tue, 07 Mar 2006 06:05
29 lines
1738 bytes
"Dennis Jones" <nospam@nospam.com> wrote:
>
> [...] my point is that the size that is returned for the
> window is NOT correct.

Confirmed.

>> > Thus, if I try to execute my centering code from anywhere within the
>> > BrowseCallbackProc function, it is always too early because the
>> > window's size has not been updated yet.

Confirmed.

> [...] BIF_NEWDIALOGSTYLE flag [...] note: you will need to
> use CoInitializeEx( NULL, COINIT_APARTMENTTHREADED ) for
> that flag to work

I do *not* need to.

> [...] Then after it gets resized, it appears offset from the
> desired form, after which the BrowseCallbackProc function
> will not be called again, thereby preventing any opportunity
> to re-position the window using its restored size.

I use AllocateHWnd and then use PostMessage when I detect
BFFM_INITIALIZED and it works for me.

~ JD
Technical Details
Message-ID: <440d30ca@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <440cc788$1@newsgroups.borland.com> <440cd987$1@newsgroups.borland.com> <440d053b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,722adf2ba600e8df
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "JD" <nospam@nospam.com>
Sender: "JD" <nospam@nospam.com>
Reply-To: "JD" <nospam@nospam.com>
Subject: Re: Positioning the SHBrowseForFolder window
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 64.12.116.201     
X-Forwarded-For: 172.166.169.141
References: <440cc788$1@newsgroups.borland.com> <440cd987$1@newsgroups.borland.com> <440d053b$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <440d30ca@newsgroups.borland.com>
Date: 6 Mar 2006 23:05:46 -0700
X-Trace: newsgroups.borland.com 1141715146 207.105.83.66 (6 Mar 2006 23:05:46 -0700)
Lines: 30
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail