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
Solved

Resize Browse for Folder dialog

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Saving the SQL Login Credentials for Excel 2010 Microsoft Queries 1 159
Messagebox for a Web Site Application 4 77
ShiftLeft challenge 21 86
wordcount challenge 11 132
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…

856 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