Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Property sheet wizard not painted correctly
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Property sheet wizard not painted correctly

 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: Property sheet wizard not painted correctly
    Posted: 05 November 2006 at 8:04am
Hi,

Please have a look at this screenshot:
 
 
I have CXTResizePropertySheet-derived wizard class with CXTResizePropertyPage-derived pages. There seem to be two problems with this.
 
1) The static controls are not painted correctly. I tried setting the transparent property, but it did not help. Nor did the WS_CLIPCHILDREN style.
2) When resizing, the wizard buttons do not react.
 
Any help is appreciated. Thanks!
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: 06 November 2006 at 1:33am
Hi,
I tried to reproduce it but failed - work as expected. Check that you call all base methods if you override CXTResizePropertySheet.
 
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: 11 November 2006 at 11:23pm
No, this is indeed a drawing bug ;) ... or perhaps I have missed something.

CPropertySheet + PSH_WIZARD97 style. That simply won't get painted correctly. When a traditional property sheet is created, the property pages are painted in a brighter color than the dialog. That is correct. In wizard mode however, the pages should be painted in the same color as the parent dialog. I managed to get the same background color by overrideing the OnPaint method:
 
void CReservationPatientPage::OnPaint()
{
    CPaintDC dc(this);
    CRect r;
    GetClientRect(&r);
    CXTMemDC memDC(&dc, r);
    CPropertyPage::DefWindowProc(WM_PAINT, (WPARAM)memDC.m_hDC, 0);
}
 
That works for the background, but not for the static controls (as can be seen in the screenshot above). Overriding OnCtlColor will not help as it is not being called. I have no more ideas.
 
Drawing bug in the Skin Framework?
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: 15 November 2006 at 7:32pm
I actually found ONE post about this CPropertyPage issue on the net:
 
 
So, this is probably not a bug in the Skin Framework. But I bet Oleg knows a workaround! :D
 
Any ideas?
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: 16 November 2006 at 12:41am
Hello,
 
As I wrote I can't reprodce it. I need sample project from you to check what you do wrong :) Attach it in issue tack and I will point what you can fix.
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: 17 November 2006 at 11:54am
Take a look at my sample:
 
Just run the app (make sure the skins are placed in \Styles) and then close it. The wizard pops up. None of the pages are painted correctly.
 
Thanks!

/Chris
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: 18 November 2006 at 3:31am
Hello, Sorry now I see problem in PSH_WIZARD97 that we didn't try.
 
please add

BOOL CMyPropertyPage::OnInitDialog()

{

CPropertyPage::OnInitDialog();

XTPSkinManager()->EnableThemeDialogTexture(m_hWnd, ETDT_DISABLE);

return TRUE;

}

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: 18 November 2006 at 11:27pm
Thanks!!!
Back to Top
asparagusx View Drop Down
Groupie
Groupie


Joined: 06 February 2007
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote asparagusx Quote  Post ReplyReply Direct Link To This Post Posted: 21 February 2007 at 3:47am

Hallo

I have a very similar problem and it does not appear to be easy to fix. I implemeted some derived dialogs from CXTResizeDialog (previously they were derived from CDialog). Resizing works a treat, but my dialogs have a 'custom' background which I display in

OnEraseBkgnd

however now all my static controls appear wrong. I used to override OnCtlColor to set  a NULL brush and SetBkMode(TRANSPARENT) for static controls and the 'background' used to be visible, now I simply get it filled with a default colour.
What should I do to get the background to be visible through the static controls?
Thanks
Anton
Back to Top
asparagusx View Drop Down
Groupie
Groupie


Joined: 06 February 2007
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote asparagusx Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2007 at 12:02am
Anybody got any ideas here! This is a serious problem.
 
Thanks
 
Anton
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: 23 February 2007 at 1:32am
Hi,
Write to support@codejock.com and send code you use.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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: 26 February 2007 at 4:10am
Hello,

To prevent flickers Resize dialog add WS_CLIPCHILDREN|WS_CLIPSIBLINGS styles, but it become cause of your problem.

To fix it, just add SetFlag(xtResizeNoClipChildren); in constructor of your dialog.

Thank you  
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
asparagusx View Drop Down
Groupie
Groupie


Joined: 06 February 2007
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote asparagusx Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2007 at 6:35am
Oleg
 
You are a STAR!
 
Thanks
 
Anton
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.172 seconds.