![]() |
CCheckListBox draws with mixed themes |
Post Reply ![]() |
Author | |
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 947 |
![]() ![]() ![]() ![]() ![]() Posted: 6 hours 6 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? ![]() |
|
![]() |
|
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 947 |
![]() ![]() ![]() ![]() ![]() |
Here is an image of the dialog when first launched and then right after I scroll the mouse wheel. ![]() |
|
![]() |
|
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 947 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
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 |