Print Page | Close Window

Property sheet wizard not painted correctly

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=5431
Printed Date: 14 May 2024 at 5:44am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Property sheet wizard not painted correctly
Posted By: znakeeye
Subject: Property sheet wizard not painted correctly
Date Posted: 05 November 2006 at 8:04am
Hi,

Please have a look at this screenshot:
 
http://www.bostream.nu/krisse/wizard.gif - http://www.bostream.nu/krisse/wizard.gif
 
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!



Replies:
Posted By: Oleg
Date 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


Posted By: znakeeye
Date 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?


Posted By: znakeeye
Date Posted: 15 November 2006 at 7:32pm
I actually found ONE post about this CPropertyPage issue on the net:
 
http://groups.google.se/group/microsoft.public.vc.language/browse_thread/thread/1a087c929313cdf4/a62feb0f75d0d95b?lnk=st&q=CtlColor+CPropertyPage&rnum=1&hl=sv#a62feb0f75d0d95b - http://groups.google.se/group/microsoft.public.vc.language/browse_thread/thread/1a087c929313cdf4/a62feb0f75d0d95b?lnk=st&q=CtlColor+CPropertyPage&rnum=1&hl=sv#a62feb0f75d0d95b
 
So, this is probably not a bug in the Skin Framework. But I bet Oleg knows a workaround! :D
 
Any ideas?


Posted By: Oleg
Date 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


Posted By: znakeeye
Date Posted: 17 November 2006 at 11:54am
Take a look at my sample:
http://www.bostream.nu/krisse/wizard_paint_problem.zip - http://www.bostream.nu/krisse/wizard_paint_problem.zip
 
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


Posted By: Oleg
Date 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


Posted By: znakeeye
Date Posted: 18 November 2006 at 11:27pm
Thanks!!!


Posted By: asparagusx
Date 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


Posted By: asparagusx
Date Posted: 22 February 2007 at 12:02am
Anybody got any ideas here! This is a serious problem.
 
Thanks
 
Anton


Posted By: Oleg
Date Posted: 23 February 2007 at 1:32am
Hi,
Write to mailto:support@codejock.com - support@codejock.com and send code you use.


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


Posted By: Oleg
Date 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


Posted By: asparagusx
Date Posted: 26 February 2007 at 6:35am
Oleg
 
You are a STAR!
 
Thanks
 
Anton



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