Archive: How to set the size of the "Browse for folder" dialog?


How to set the size of the "Browse for folder" dialog?
I am having some trouble with the DirRequest field on a custom page in that, the "Browse for folder" dialogue box that appears varies wildly in size on our testers computers.

Is there a way to set the size, and how do you do it?

Thanks in advance.


That's a common Window's dialog and has a fixed size. The size will vary depending on the system font or resolution (doh!)

Stu


Are you sure it's fixed size?
I can re-size and re-position my "Browse for Folder" dialogue box and its size is somehow remembered each time I run the installer. The position is always relative to the installer Window, which in some cases can result in part of the dialogue box being outside of the screen area.

Is this a registry setting somewhere, or something?


No answer?
I'm guessing no one has an answer on this one...


Good point. You can resize it! No idea where the size is saved though and I could not find anything on Google.

Stu


it's done a global and then per-app instance from what i remember. you can cause a resize if you use the callback mechanism on that api but that'd require the IO plugin to altered to have that ability (i can't remember what else is required for it since it's been an age since i messed around with those parts of the OS - really needs a read of the api specs and for someone to go from there)

-daz


I changed the size of my browse dialog in an NSIS test installer and then in Thunderbird it was the same size (long after closing the installer).

Stu


i think there were OS inconsistancies with that sizing. has been so long since i had to mess around with that stuff i can't remember for certain so i could be entirely wrong, heh. either way, it's a hack to get the thing sized to something different and shouldn't be done

-daz


From top of my head there was somewhere a plugin where one browsed for destination directory INSIDE the installer window.

The other way is to get the x,y,w,h of the NSIS main window (Modern interface) via windows messages on .oninit store the vaues, then after the browse dialog just opened find the dialog handle then send a message to the dialog and resize to the coordinates of the installer main window.

If the above does not make sense to you just ignore, because the solution you want will take a LOT of effort if you have never done anything like this before.