Solved

Resize Browse for Folder dialog

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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
no14 challenge 14 76
noX challenge 17 144
How to LOAD up a .NET Framework website with data? 2 60
Example code 13 42
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 …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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…

734 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