changing defaults for common dialogs 
Author Message
 changing defaults for common dialogs

Hello,

I want to change the default labeling of items in a common dialog box.
Since I will not change it for every single one, it would be nice to
change the default
settings for the entirety of appearing boxes.
Could anybody tell me if this is possible and how to manage this?

Marco



Sat, 05 Jun 2004 20:52:51 GMT  
 changing defaults for common dialogs
subclass the control. Handle OnInitDialog, and write your own DDX_Control handlers for
names like stc1, chx1, and other meaningless names from the standard dlgs.h header file,
e.g., declare
        CStatic c_WhateverLabel;

and, OUTSIDE the magic AFX_ comments in the DoDataExchange, add
        DDX_Control(pDX, stc1, c_WhateverLabel);
which connects the control to the variable. Then in OnInitDialog write

        c_WhateverLabel.SetWindowText("MyLabel");

Note that if your text is wider than expected, you get additional problems, such as a need
to resize the label, move other controls, etc., but this is what I've done.
                                joe

Quote:

>Hello,

>I want to change the default labeling of items in a common dialog box.
>Since I will not change it for every single one, it would be nice to
>change the default
>settings for the entirety of appearing boxes.
>Could anybody tell me if this is possible and how to manage this?

>Marco

Joseph M. Newcomer [MVP]

Web: http://www3.pgh.net/~newcomer
MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm


Sun, 06 Jun 2004 03:27:21 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Context help for common dialogs (default help)

2. How can I change behavior of Common Dialog.

3. Common File Dialog, how do I change button text

4. Changing the Title of a Common Dialog

5. Changing dialog default font size

6. Q: changing the default save dialog in windows

7. Change the default color of a dialog window

8. changing the default file extension in the file open dialog box

9. Cannot display the dialog derived from common file dialog

10. Nesting Common File Dialog within my Dialog

11. Common Open Dialog not displaying a dialog when file doesn't exist

12. OT: General question regarding source control and how to handle changes to common codebases

 

 
Powered by phpBB® Forum Software