Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Skin Bug with CSliderCtrl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Skin Bug with CSliderCtrl

 Post Reply Post Reply
Author
Message
dedvalson View Drop Down
Groupie
Groupie


Joined: 10 April 2008
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote dedvalson Quote  Post ReplyReply Direct Link To This Post Topic: Skin Bug with CSliderCtrl
    Posted: 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.
 
Can you suggest a workaround, or is this a real bug?
Thanks,
Don
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: 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
Back to Top
dedvalson View Drop Down
Groupie
Groupie


Joined: 10 April 2008
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote dedvalson Quote  Post ReplyReply Direct Link To This Post 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
 
Back to Top
dedvalson View Drop Down
Groupie
Groupie


Joined: 10 April 2008
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote dedvalson Quote  Post ReplyReply Direct Link To This Post 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
 
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: 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
Back to Top
dedvalson View Drop Down
Groupie
Groupie


Joined: 10 April 2008
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote dedvalson Quote  Post ReplyReply Direct Link To This Post 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
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: 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
Back to Top
dedvalson View Drop Down
Groupie
Groupie


Joined: 10 April 2008
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote dedvalson Quote  Post ReplyReply Direct Link To This Post 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
 
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: 21 April 2008 at 8:48am
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
dedvalson View Drop Down
Groupie
Groupie


Joined: 10 April 2008
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote dedvalson Quote  Post ReplyReply Direct Link To This Post 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

 

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.156 seconds.