Sign in to follow this  

Open File Dialog Hacking Questions [Win32, C++]

This topic is 2546 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello I have a few questions about the Open file dialog you can make in Win32. My first question is: Is it possible to speed up loading? It seems like it takes 3-4 seconds to appear when I call it.

My second question is, is it possible to chance the background color of the file list area in the Open File dialog? I seen some hacks done to a few of them, such as adding check boxes or changing the layout or will I simply have to make my own open file dialog to do this?

Thanks for reading, ajm113.

Share this post


Link to post
Share on other sites
Quote:
Original post by ajm113
Hello I have a few questions about the Open file dialog you can make in Win32. My first question is: Is it possible to speed up loading? It seems like it takes 3-4 seconds to appear when I call it.


It can be slow the first time an app opens the OpenFile dialog, because lots of stuff is going on: a bunch of DLL's are getting loaded, etc. However, if you're seriously seeing 4 seconds in a Release build something might be wrong and/or causing the slowness.

Quote:

My second question is, is it possible to chance the background color of the file list area in the Open File dialog? I seen some hacks done to a few of them, such as adding check boxes or changing the layout or will I simply have to make my own open file dialog to do this?


There is no easy way to customize the common dialog boxes beyond what you can do when filling in the structures that define them, e.g. OPENFILENAME; however, there are non-easy ways to do some customization.

You can, for example, do win32 subclassing on the Open File dialog. This however turns out not to be as helpful as one would think, because what you really want to subclass are the child controls. The other thing to do is to install a WH_CALLWNDPROC hook when the dialog is on the screen and poll for the dialog and its children in your hook procedure (some guy talks about doing this here, although it's poorly written).

If all you want to do is change the background color of one of the child controls, you might be able to do this just by subclassing the relevant control. This kind of thing usually turns out to be brittle and will cause problems down the line, however.

Share this post


Link to post
Share on other sites
Quote:
Original post by jwezorek
Quote:
Original post by ajm113
My second question is, is it possible to chance the background color of the file list area in the Open File dialog? I seen some hacks done to a few of them, such as adding check boxes or changing the layout or will I simply have to make my own open file dialog to do this?


There is no easy way to customize the common dialog boxes beyond what you can do when filling in the structures that define them, e.g. OPENFILENAME;


Indeed, there is no easy way to change the background colour. Except perhaps if you read the bit that tells you how to do it (Fifth paragraph of the remarks)

Share this post


Link to post
Share on other sites
Quote:
Original post by adeyblue
Quote:
Original post by jwezorek
Quote:
Original post by ajm113
My second question is, is it possible to chance the background color of the file list area in the Open File dialog? I seen some hacks done to a few of them, such as adding check boxes or changing the layout or will I simply have to make my own open file dialog to do this?


There is no easy way to customize the common dialog boxes beyond what you can do when filling in the structures that define them, e.g. OPENFILENAME;


Indeed, there is no easy way to change the background colour. Except perhaps if you read the bit that tells you how to do it (Fifth paragraph of the remarks)


Huh, didn't know about that stuff ... However, wouldn't that just let you change the background color of the dialog itself, not the ListView as the OP seems to want.

Share this post


Link to post
Share on other sites

This topic is 2546 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this