|
|
Home » U++ Library support » Look and Chameleon Technology » A question of C++
A question of C++ [message #20619] |
Fri, 27 March 2009 10:06 |
kbyte
Messages: 87 Registered: July 2008
|
Member |
|
|
I have a SDI like application (developed using UPP) that has a menu and in it client are there is the main data where user makes their work. This application has lots of dialogs that are opened, using the main menu, in a modal fashion.
Now the user doesn’t like the windows default colors and want to customize every color in every control (grids, labels, edits, etc) in all dialogs, including the client are of the main window.
Mirek had helped me in colorization (thank you again) of controls and the main Windows client are ready and sesnitive to colors stored in a binary file (windows background, label forecolor, edits textcolor, etc). Now I have to apply this to all modal dialogs too when they are invoked.
I know that C++ has means to make this without code copy-past, say, by deriving classes but has I don’t have enough skills for that I would like to ask you the best way to do that.
All my modal dialogs classes are follow this pattern:
class CChangeUnitsDlg : public WithChangeUnitsDlgLayout<TopWindow>
{
…
}
Hence, all dialogs must store and be sensitive to the selected colors for background, labels and text on edit controls and on painting time the dialogs must paint using the selected colors.
Thanks very much
Alex
|
|
|
Re: A question of C++ [message #20620 is a reply to message #20619] |
Fri, 27 March 2009 12:29 |
kbyte
Messages: 87 Registered: July 2008
|
Member |
|
|
I am trying this:
#include "ColoringSystem.h"
...
class CChangeUnitsDlg : public WithChangeUnitsDlgLayout<TopWindow> , public CColoringSystem
{
…
}
and the CColoringSystem will store all needed colors and the paint of the CChangeUnitsDlg will paint every control 1 by one using the colors in the CColoringSystem class.
Alex
[Updated on: Fri, 27 March 2009 12:35] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Dec 13 22:29:15 CET 2024
Total time taken to generate the page: 0.03190 seconds
|
|
|