Solved

Resize Browse for Folder dialog

Posted on 2008-06-24
2
819 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
In this post we will learn different types of Android Layout and some basics of an Android App.
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…

696 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