Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » colors in skinned apps / files Collapse All
Subject Author Date
vabsolutions Oct 17, 2010 - 3:22 PM

Dear support,



In a skinned application,

Is it possible to use a color instead of an image to draw, for example, a background.



I would like to do it without having to change my application.

(like editing the xml skin file)



thank you.

Technical Support Oct 17, 2010 - 11:55 PM

The background is painted by the following virtual method of a paint manager class:

   virtual bool PaintDockerBkgnd(
                        bool bClientMapping,
                        CDC & dc,
                        CWnd * pWnd,
                        LPARAM lParam = NULL
                        );
Generally it does always mean that the background has a specific color assigned. It can be a solid color in one theme. It can be a gradient in another theme. It can be based on bitmaps in yet another theme. You can override the above method in your paint manager class and repaint the background of any UI element.

Prof-UIS also supports a feature that allows you to paint the background consistently for parent and child controls in your application. This feature is demonstrated in the TabbedBars sample. Please read the following forum threads:

http://www.prof-uis.com/prof-uis/tech-support/faq/miscellaneous.aspx#how-to-paint-a-custom-background-consistent-between-the-windows-in-my-application
http://www.prof-uis.com/prof-uis/tech-support/general-forum/how-to-set-background-image-on-dialog-65196.aspx#65198
http://www.prof-uis.com/prof-uis/tech-support/general-forum/custom-background-colour-for-cextresizabledialog-54409.aspx
http://www.prof-uis.com/prof-uis/tech-support/general-forum/how-to-change-background-color-of-a-modeless-dialog-box-64189.aspx
http://www.prof-uis.com/prof-uis/tech-support/general-forum/handling-wm_paint-message-for-cextresizabledialog-61578.aspx

Most of the forum threads above are related to dialog background repainting. But you can use that for any windows.