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.
Subject |
Author |
Date |
|
Offer Har
|
Nov 20, 2006 - 6:14 AM
|
Hi,
I have a CWnd custom control that paints its own. My problem is that it does not ’blend’ with the background of the skinned dialogs. What is the way to make such a control transparent?
Thanks.
|
|
Technical Support
|
Nov 20, 2006 - 11:54 AM
|
You can use the following code in your WM_PAINT message handler to make your control’s background consistent with the current theme: bool bTransparent = false;
if( (! bTransparent )
&& PmBridge_GetPM()->GetCb2DbTransparentMode(this)
)
{
CExtPaintManager::stat_ExcludeChildAreas(
dc,
GetSafeHwnd(),
CExtPaintManager::stat_DefExcludeChildAreaCallback
);
if( PmBridge_GetPM()->PaintDockerBkgnd( true, dc, this ) )
bTransparent = true;
}
if( ! bTransparent )
dc.FillSolidRect(
&rcClient,
PmBridge_GetPM()->GetColor( CExtPaintManager::CLR_3DFACE_OUT, this )
);
|
|
Offer Har
|
Nov 20, 2006 - 12:25 PM
|
1. Your code has extra line between every row - please check. 2. My control is CWnd base - how do i make it know PmBridge_GetPM? Thanks.
|
|
Offer Har
|
Nov 20, 2006 - 12:42 PM
|
Thanks... I managed myself ;-) And it works.
|
|