Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - I want a (slider)control to not be skinned
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

I want a (slider)control to not be skinned

 Post Reply Post Reply
Author
Message
Bart View Drop Down
Newbie
Newbie
Avatar

Joined: 17 July 2006
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bart Quote  Post ReplyReply Direct Link To This Post Topic: I want a (slider)control to not be skinned
    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!
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: 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
Back to Top
Bart View Drop Down
Newbie
Newbie
Avatar

Joined: 17 July 2006
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bart Quote  Post ReplyReply Direct Link To This Post 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!
 
 
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post 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
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.