Hwnd for the Options dialog?

  • Thread starter Thread starter Fred Block
  • Start date Start date
F

Fred Block

Hi All,

I'm setting up a Property page for my COM Add-In. I want to add a Browse
Folder dialog like I use in my app's but don't know how to set the "hwnd"
property (actually, I didn't find one available).

I'm sing the "SHBrowseForFolder" function. Is this the way to go or is there
another easier way?

Thanks again!

Kind regards - Fred
 
Browse for what?

You don't get a handle to which page is being displayed in the Options
property pages.
 
Hi Ken,
Browse for what?

A file system folder.
You don't get a handle to which page is being displayed in the Options
property pages.

Here's what I found to work for me:

hwndParent = GetParent(UserControl.hwnd)

Then ultimately, the "hwndParent" value is passed to the SHBrowseForFolder
function.

My Add-In needs to allow a user to point to a system folder and at first I
wasn't sure which HWND to pass to the function but figured it out.

Thanks for the follow-up!

Regards - Fred
 
I'm glad you worked it out. I usually use the MS common dialog control
when I want to select system folders or files in my addin property
pages. I just place that control on either the property page OCX or a
VB form called from the page, with a command button there to initiate
the common dialog control.
 
Back
Top