Print Page | Close Window

WS_CLIPCHILDREN question

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Visual C++ MFC Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=14506
Printed Date: 25 May 2024 at 9:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: WS_CLIPCHILDREN question
Posted By: znakeeye
Subject: WS_CLIPCHILDREN question
Date Posted: 11 June 2009 at 5:57am
I have a special CFrameWnd with a CXTPButton placed at the upper-right corner (a close button). My problem is that I want to fill the main window with a gradient (as seen below), but not over my button. I have set WS_CLIPCHILDREN style, so the button area is indeed left alone. However, the button itself is not painted until I hover it. Why?
 
void CMainFrame::OnPaint()
{
    CClientDC dc(this);
    CXTPClientRect rect(this);
    XTPDrawHelpers()->GradientFill(&dc, rect, RGB(192, 192, 192), RGB(255, 255, 255), FALSE);
}


-------------
PokerMemento - http://www.pokermemento.com/



Replies:
Posted By: Oleg
Date Posted: 11 June 2009 at 7:26am

Can be reason

void CMainFrame::OnPaint()
{
    CPaintDC dc(this);
    CXTPClientRect rect(this);
    XTPDrawHelpers()->GradientFill(&dc, rect, RGB(192, 192, 192), RGB(255, 255, 255), FALSE);
}


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


Posted By: znakeeye
Date Posted: 12 June 2009 at 6:52am
Thanks :P

-------------
PokerMemento - http://www.pokermemento.com/



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