Print Page | Close Window

I want a (slider)control to not be skinned

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=6595
Printed Date: 22 November 2024 at 6:36pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: I want a (slider)control to not be skinned
Posted By: Bart
Subject: I want a (slider)control to not be skinned
Date Posted: 08 March 2007 at 8:49am
Hi All,
 
I already tried XTPSkinManager()->Remove(hwnd), which works, except that on exit MFC Asserts during DestroyWindow() that there's something wrong with the parmanentmap (link between hWnd and CWnd objects). Other then the assert, things work fine.
 
I've tried both calling XTPSkinManager()->Remove(hwnd) before and after baseclass::OnCreate().
 
The control concerned is a CSliderCtrl derived that does custom painting for all elements (except background, but it works fine with the skin).
 
Thanks in advance!



Replies:
Posted By: Oleg
Date Posted: 09 March 2007 at 2:51am
Hi,
I tried it in our sample created new class, added
int CMySlider::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
 if (CSliderCtrl::OnCreate(lpCreateStruct) == -1)
  return -1;
 
 XTPSkinManager()->Remove(m_hWnd);
 
 return 0;
}
 
and create:
 
 ms.Create(WS_CHILD|WS_VISIBLE, CRect(0, 0, 400, 30), this, 0);
 
works good
 
Can you try to reproduce problem and attach project?


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


Posted By: Bart
Date Posted: 12 March 2007 at 3:37am
Hi, thank you for the sample, that works as advertised
 
Was missing the if clause , and was using GetSafeHwnd() to pass to Remove().  Maybe that the control is created through dlgtemplate and attached using ddx has something to do with it.

Anyways, thanks for the swift and helpfull reply!
 
 


Posted By: Simon HB9DRV
Date Posted: 27 August 2009 at 1:48pm
Originally posted by Bart Bart wrote:

Hi, thank you for the sample, that works as advertised
 
Was missing the if clause , and was using GetSafeHwnd() to pass to Remove().  Maybe that the control is created through dlgtemplate and attached using ddx has something to do with it.

Anyways, thanks for the swift and helpfull reply!
 
 
And many thanks from me :)

-------------
Simon HB9DRV



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