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

CCheckListBox draws with mixed themes

 Post Reply Post Reply
Author
Message
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 947
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: CCheckListBox draws with mixed themes
    Posted: 4 hours 30 minutes ago at 9:52am
When we apply our skin and display a CDialog that has a CCheckListBox in it we initially see the skin applied to all the items in the list box. But scroll the mouse wheel and the items draw incorrectly. The items draw using the system theme. Checking and unchecking items result in them redrawing using the skin. I thought CJ skinning was categorized as Visual C++ MFC meaning it works well with MFC. CCheckListBox is a MFC class but it does do custom drawing. In the image I am going to (try) and paste here one can see our theme background and the theme text color. But the "View 1" checked box is drawn using the system theme. "Front" is not checked and is using the system theme. "Back" is checked and uses the skin (yes the check box is quite pixelized as we wait and hope for SVG support for check/radio button). The other white boxes are system themed. "Dimetric" is unchecked and using our skin. I got this image by launching the dialog and then checking elements. Then I scrolled. After that I unchecked and checked "Back" and then unchecked "Dimetric".

How do I address this issue?


Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 947
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 4 hours 22 minutes ago at 10:00am
Here is an image of the dialog when first launched and then right after I scroll the mouse wheel.


Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 947
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 1 hour 54 minutes ago at 12:28pm
I found that scrolling the view resulted in OnHookDrawThemeBackground to bypass the skinning code because the DC has no hWnd associated with it and IsDCSkinned(hDC) returned FALSE. I have to apply the xtpSkinApplyDCs skin option before invoking the dialog. Unfortunately for me, that causes all windows to repaint when I apply it and also when I remove it. Apparently I never set that option when we start up because when I first worked with skins, it wasn't available. And we decided back then to not use CJ skinning as we were just experimenting with them.

Basically our app originally set the same options CJ does in the skin manager ctor and I used that to change the options to observe the skinning effects.

I also see a xtpSkinApplyCommandBarsFrame option is now available. But we skin the frame and CJ indicates the two are incompatible.
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.047 seconds.