Print Page | Close Window

problem with dialog box background

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1137
Printed Date: 10 November 2025 at 3:22am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: problem with dialog box background
Posted By: michalp
Subject: problem with dialog box background
Date Posted: 03 September 2004 at 10:19am

Hi,

I am creating a dialog box that has a gradient background and is using the toolkit's buttons, however the static and group box background is not repainted with the background, does anyone have an idea how to blend the background with the one of the dialog. I did try the transparent property, but it did not work. I am attaching a screen shot and I think it will explain everything.

Thanks in advance for your help.

 




Replies:
Posted By: Oleg
Date Posted: 05 September 2004 at 3:42am

see WM_CTLCOLOR description + sample in MSDN.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Ark42
Date Posted: 05 September 2004 at 6:21pm

That wil only change the solid color, not allow gradiants, won't it?



Posted By: jimmy
Date Posted: 07 September 2004 at 2:20am
with WM_CTLCOLOR you can also say, to paint the text transparent
    Jimmy



Posted By: michalp
Date Posted: 07 September 2004 at 9:54am

Thanks that worked,

for other people's reference here is what I used:

inside the OnCtlColor handler

HBRUSH hbr;

if( nCtlColor == CTLCOLOR_STATIC )

{

pDC->SetBkMode(TRANSPARENT);

hbr = (HBRUSH)GetStockObject( NULL_BRUSH );

}

else

{

hbr = CXTPDialog::OnCtlColor(pDC, pWnd, nCtlColor);

}



Posted By: jimmy
Date Posted: 21 March 2006 at 4:34am
Hello,

Now i will use this with v9.81 and CXTResizeDialog.
But they doesN#t work, because of WS_CLIPCHILDREN.

Any solution ?

    Jimmy



Posted By: jimmy
Date Posted: 21 March 2006 at 4:47am
Hello,

i found a solution.
Use xtResizeNoClipChildren.
But if size icon is visible and the dialog is resized, the are painting troubles.
Is there also a way to make the sizeIcon transparent ?

    Thanx





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net