![]() |
Property sheet wizard not painted correctly |
Post Reply ![]() |
Author | |
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() 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!
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
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?
|
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
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?
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
Thanks!!!
|
|
![]() |
|
asparagusx ![]() Groupie ![]() Joined: 06 February 2007 Status: Offline Points: 55 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
asparagusx ![]() Groupie ![]() Joined: 06 February 2007 Status: Offline Points: 55 |
![]() ![]() ![]() ![]() ![]() |
Anybody got any ideas here! This is a serious problem.
Thanks
Anton
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Write to support@codejock.com and send code you use.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
asparagusx ![]() Groupie ![]() Joined: 06 February 2007 Status: Offline Points: 55 |
![]() ![]() ![]() ![]() ![]() |
Oleg
You are a STAR!
Thanks
Anton
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |