Article View: borland.public.cppbuilder.nativeapi
Article #4217Re: Positioning the SHBrowseForFolder window
From: Dennis Jones
Date: Tue, 07 Mar 2006 16:35
Date: Tue, 07 Mar 2006 16:35
40 lines
2498 bytes
2498 bytes
"JD" <nospam@nospam.com> wrote in message news:440d30ca@newsgroups.borland.com... > > "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. From MSDN: BIF_NEWDIALOGSTYLE Version 5.0. Use the new user interface. Setting this flag provides the user with a larger dialog box that can be resized. The dialog box has several new capabilities including: drag-and-drop capability within the dialog box, reordering, shortcut menus, new folders, delete, and other shortcut menu commands. To use this flag, you must call OleInitialize or CoInitialize before calling SHBrowseForFolder. I know very little about these SHxxx functions. But I have noticed that sometimes CoInitialize is needed, and other times it isn't (as if it has already been called by some other code I don't have control over). I suspect if it hasn't been called already by some library you are using, that you will have to call it yourself. - Dennis
Technical Details
Message-ID:
<440db652$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!208.48.142.85!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<440cc788$1@newsgroups.borland.com> <440cd987$1@newsgroups.borland.com> <440d053b$1@newsgroups.borland.com> <440d30ca@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: "Dennis Jones" <nospam@nospam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <440cc788$1@newsgroups.borland.com> <440cd987$1@newsgroups.borland.com> <440d053b$1@newsgroups.borland.com> <440d30ca@newsgroups.borland.com> Subject: Re: Positioning the SHBrowseForFolder window Date: Tue, 7 Mar 2006 08:35:32 -0800 Lines: 42 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 204.200.27.7 Message-ID: <440db652$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1141749330 204.200.27.7 (7 Mar 2006 08:35:30 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!208.48.142.85!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail