Hwnd for the Options dialog?

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
 
K

Ken Slovak - [MVP - Outlook]

Browse for what?

You don't get a handle to which page is being displayed in the Options
property pages.
 
F

Fred Block

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top