Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - problem with dialog box background
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

problem with dialog box background

 Post Reply Post Reply
Author
Message
michalp View Drop Down
Newbie
Newbie
Avatar

Joined: 03 September 2004
Location: United States
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote michalp Quote  Post ReplyReply Direct Link To This Post Topic: problem with dialog box background
    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.

 

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 05 September 2004 at 3:42am

see WM_CTLCOLOR description + sample in MSDN.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 05 September 2004 at 6:21pm

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

Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 516
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Posted: 07 September 2004 at 2:20am
with WM_CTLCOLOR you can also say, to paint the text transparent
    Jimmy

Back to Top
michalp View Drop Down
Newbie
Newbie
Avatar

Joined: 03 September 2004
Location: United States
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote michalp Quote  Post ReplyReply Direct Link To This Post 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);

}

Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 516
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 516
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post 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


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.078 seconds.