Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > General Discussion
  New Posts New Posts RSS Feed - WS_CLIPCHILDREN question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

WS_CLIPCHILDREN question

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: WS_CLIPCHILDREN question
    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/
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 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
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2009 at 6:52am
Thanks :P
PokerMemento - http://www.pokermemento.com/
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.156 seconds.