Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29281 Discussions

Customizing dialog box colors using subclassing: reprise

TommyCee
Beginner
517 Views
I read Anthony Richards excellent didactic article on this topic here:
http://software.intel.com/en-us/articles/how-to-customize-dialog-box-colors-using-subclassing/

and posted praise, some comments and a few questions (in case any wish to have a look). In particular, I raised an interesting problem in which I'm trying to colorize each of the tabbed dialogs in a Tab Control, which is subtended by a Dialog Box. As I describe, I get an either/or situation (I'd like to color the tabs AND the background Dialog Box.

But I forgot to ask this: While Anthony did an excellent job addressing colorization, I wish someone (Anthony?) could please explain - using the very same construct - how to effect a special font style for the Static Text Boxes in the DEMO. I would hope this would include a way to impose a special font, but more importantly, how to change the font pitch (pt. size). For some of the Static Text strings, I'd like to impose a larger font pitch. I guessing that the function MyDlgProc() would be modified to accomplish this, perhaps making use of WM_SetFont (?).

As always, and ideas are appreciated.
0 Kudos
2 Replies
dannycat
New Contributor I
517 Views
Quoting - tommycee
I read Anthony Richards excellent didactic article on this topic here:
http://software.intel.com/en-us/articles/how-to-customize-dialog-box-colors-using-subclassing/

and posted praise, some comments and a few questions (in case any wish to have a look). In particular, I raised an interesting problem in which I'm trying to colorize each of the tabbed dialogs in a Tab Control, which is subtended by a Dialog Box. As I describe, I get an either/or situation (I'd like to color the tabs AND the background Dialog Box.

But I forgot to ask this: While Anthony did an excellent job addressing colorization, I wish someone (Anthony?) could please explain - using the very same construct - how to effect a special font style for the Static Text Boxes in the DEMO. I would hope this would include a way to impose a special font, but more importantly, how to change the font pitch (pt. size). For some of the Static Text strings, I'd like to impose a larger font pitch. I guessing that the function MyDlgProc() would be modified to accomplish this, perhaps making use of WM_SetFont (?).

As always, and ideas are appreciated.

Please refer to a similar thread that I instigated"Changing Text Colours/Fonts in dialog controls" dated April 11th 2009. This may be usefull to you.
0 Kudos
anthonyrichards
New Contributor III
517 Views

For TommyCee: Thank you for you kind comments on my article. I have left a comment there about your tabbed dialog background coloring problem, but am reposting it here as I cannot post a JPG attachment there.

I have created a tabbed dialog with 3 tabs using the recommended method. Iattach aJPG that shows what I see. I can assure you that all three tab windows and the main dialog have their background colors correctly reprogrammed using the subclass method I described. The tabs remain uncoloured. The only way of colouring them using Fortran I think is by making them OWNERDRAW style and then drawing the whole tab window by responding to the WM_DRAWITEM messages. This will clearly be much ore complicated. Obviously you can get many more options for changing properties if you program the GUI in VC++.

0 Kudos
Reply