[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Resize Browse for Folder dialog

Posted on 2008-06-24
2
Medium Priority
?
847 Views
Last Modified: 2013-12-03
Hi experts,

I am using a wrapper class of SHBrowseForFolder function in order to display a Browse for Folder dialog.

However, the dialog appears very small by default and I would like to resize it programmatically.

When the dialog is resized by the user, it retains its position in subsequent calls. I suppose that Windows stores its position somewhere in the registry, and thus it could be manipulated easily. But how to find where?
0
Comment
Question by:pamir
2 Comments
 
LVL 19

Accepted Solution

by:
mrwad99 earned 500 total points
ID: 21857817
I don't know where the info is stored in the registry (it would be easy enough to find: export the registry, display the dialog, resize it, close it, re-export the registry and compare the two exports) but I don't think that is the way to go.

Personally I would wait for the window to be created, then get a handle to it and use SetWindowPos() or equivalent to resize it.

HTH
0
 

Author Comment

by:pamir
ID: 21863308
Yes, I have found it - keys are HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Browse For Folder Width and Browse For Folder Height.

I have followed your advice - exported registry twice and found the difference - and this way I have found the name of the key.

The other way you suggested - to use SetWindowPos() - is very hard to implement, since I need also to properly resize and reposition all controls on the dialog, which will take me a lot of efforts.

Thanks for your suggestion!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question