![]() |
Transparency and Tab Controls |
Post Reply
|
| Author | ||
JohnCrenshaw
Groupie
Joined: 08 September 2006 Status: Offline Points: 65 |
Post Options
Thanks(0)
Quote Reply
Topic: Transparency and Tab ControlsPosted: 05 January 2007 at 4:43pm |
|
|
Aaahhh!!!
HELP!!! I pulled my hair out for a few days to be able to use the tab controls (CXTTabCtrl) nicely in 10.3.1. Now I have downloaded and installed 10.4 and my old fix doesn't work!!!
Some background on my solution. I needed to encapsulate each page of the control in it's own class (CXTResizePropertyPage derived currently.) Using the following code I added these pages:
The trouble with this is that the tab control, as encapsulated by CXTTabCtrl, has a nice pretty gradient background, while the property pages have a nice ugly solid background. Place the one on top of the other and it is REALLY ugly. I needed to fix this so I divined the following solution:
Basically, the code assumes that we are on top of a CXTTabCtrl, which is the parent. We grab the parent, ask it to paint itself on our device context (as our method of erasing the background) position everything properly, and return true (to indicate that the background was erased.)
In version 10.3.1 this solution worked, in the current version the net effect seems to be nothing.
I would of course be satisfied with just being able to see the tab control background again, however, ultimately, this solution is ugly. Is there any chance of getting a more solid solution in the future, perhaps a CXTTabControlPage that removes the burden from code on the user side?
I have a hard time imagining that I am the first person to have a problem with this. Using tab controls is an immense amount of work because of the gradient background. I had to override and paint Checkboxes, radio buttons, group boxes, static text, and there are some things I didn't get to because I didn't need to use them. Perhaps it wouldn't be a bad idea to have a set of classes to draw these "transparent" items in a truly transparent fashion. Without this, the tab controls are hard enough to use, it isn't even worth it anymore for the average program, however, I digress.
I have everything in place to be able to use the tab controls, but I can't because the stupid property page can't pretend to be transparent anymore. Can anybody suggest a solution?
John.
|
||
![]() |
||
jansim
Groupie
Joined: 03 November 2005 Location: Canada Status: Offline Points: 20 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 March 2007 at 2:42pm |
|
|
Hi, we have the same problem here. We worked hard to find a solution that worked with MFC and Win32. We want to do the same thing with the resize dialogs that Code Jock offers, but now the background of the dialog doesn't match the one of the tab control.
This is a regretable glitch. We cannot accept to release a software with ugly property pages.
So I ask the question again : Can anybody suggest a solution?
|
||
![]() |
||
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 29 March 2007 at 1:22am |
|
|
Hi,
Can you upload some screenshots to show what you mean.
|
||
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
![]() |
||
jansim
Groupie
Joined: 03 November 2005 Location: Canada Status: Offline Points: 20 |
Post Options
Thanks(0)
Quote Reply
Posted: 29 March 2007 at 8:52am |
|
|
I think we figured out how to do it !
When creating the tab child dialog, we must call the following:
XTPSkinManager()->EnableThemeDialogTexture( childDlg.GetSafeHwnd(), ETDT_ENABLE_TAB );
Then for every group box in the dialog, we must use a CXTResizeGroupBox.
It works fine this way.
Is is really simple to use, thank you for supporting this nice feature . We just had a hard time finding how to do it.It would be a good idea to add a sample with a dialog as a tab control page that is not a CPropertyPage.
Best regards
Jansim
|
||
![]() |
||
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 |