Solved

Resize Browse for Folder dialog

Posted on 2008-06-24
2
790 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 125 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now