![]()  | 
 
Skin Bug with CSliderCtrl | 
 
    Post Reply  
   | 
  
| Author | |
   
   dedvalson  
   
   Groupie  
   Joined: 10 April 2008 Status: Offline Points: 21  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Skin Bug with CSliderCtrlPosted: 18 April 2008 at 12:24pm  | 
 
| 
   
    
   I am using the Skin Framework on an existing MFC Application.
 
   
  One of my dialogs has a CSliderCtrl in it.  
I have found that after I call XTPSkinManager()->LoadSkin for any skin the Slider Controls Selection (as set by SetSelection) is never drawn. 
Don 
    | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 18 April 2008 at 1:47pm | 
 
| 
   
    
   Hello,
 
   
  SkinFramework do same as WindowsXP theming. You can see that Windows XP draws it same. 
Add "Tick Marks" style and Slider will show Selection range. 
    | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   dedvalson  
   
   Groupie  
   Joined: 10 April 2008 Status: Offline Points: 21  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 18 April 2008 at 3:19pm | 
 
| 
   
    
   Hi, 
 
   
  I am afraid that this is not the case. 
The slider already has the "Tick Marks" property set to true. When I call LoadSkin(), the selection is not drawn. If I comment out that one line of code then the selection is drawn properly. 
I used Spy++ and verifed that the Window Style and Extended Styles are identical both when it is drawn and when it is not drawn. 
Any further suggestions? 
Thanks, 
Don 
 | 
 |
![]()  | 
 |
   
   dedvalson  
   
   Groupie  
   Joined: 10 April 2008 Status: Offline Points: 21  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 18 April 2008 at 3:22pm | 
 
| 
   
    
   A further small bit of info.
 
   
  The little triangles that go next to the tick marks are drawn. It is the bar itself in the middle of the trough that is not drawn. 
Don 
 | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 18 April 2008 at 3:29pm | 
 
| 
   
    Hello, SkinFramework do same as WindowsXP theming. You can see that Windows XP draws it same. 
    | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   dedvalson  
   
   Groupie  
   Joined: 10 April 2008 Status: Offline Points: 21  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 18 April 2008 at 3:38pm | 
 
| 
   
    OK, I think I understand what you are saying. Here is the window when I apply the built-in Windows Theme using the LoadSkin() call. 
Here it is if I don't call LoadSkin() 
Is there a way to get the blue bar back even if I have loaded a Skin (Built in XP or otherwise?) 
PS: Both pictures are from a system running XP 
    | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 19 April 2008 at 12:18am | 
 
| 
   
    
   Hello,
 
   
  Afraid I have repeat it again :) 
Give me screesnshot how you see it without SkinFramework, but with Enabled WinXP themes (comctr32.dll v6) . add manifest to your project: 
To add manifest  
1. Copy Samples\AboutDlg\res\manifest.xml  to your res folder 
2. Add line in app.rc file  
1           24      DISCARDABLE     "res\\manifest.xml" 
    | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   dedvalson  
   
   Groupie  
   Joined: 10 April 2008 Status: Offline Points: 21  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 21 April 2008 at 8:18am | 
 
| 
   
    
   Oleg,
 
   
  You are absolutely right.  When I set up the manifest and so forth I got the same results. 
That is what I meant to say last post, but I didn't say it very well. 
I don't know why Microsoft did this, but it will not work for our app. So I guess my question now is could you advise me how I might proceed to fix this? 
I tried putting some custom drawing on the control using the normal MFC methods, but that seems to conflict with the PaintManager. So I guess I need to modify that (or modify the theme) somehow.  
Could you point me to where I ought to start. 
Don 
 | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 21 April 2008 at 8:48am | 
 
| 
   
    Hi, Check this post - https://forum.codejock.com/forum_posts.asp?TID=7993 
    | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   dedvalson  
   
   Groupie  
   Joined: 10 April 2008 Status: Offline Points: 21  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 21 April 2008 at 8:55am | 
 
| 
   
    Hi, Thank you , that solved my problem. Sorry about all of the confusion I had in getting to the right question. Don 
  | 
 |
![]()  | 
 |
    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  |