Statics in tab pages on WinXP?
-
Hello! I've got a property page, containing a tab view. The tab pages are a bit brighter than the normal dialogs, which seems to be correct. But unfortunately all the static controls in this tab page have the standard gray color, i.e. the one of the dialogs and not the one of the tab page. How can I make the statics look correct? Best regards
-
Hello! I've got a property page, containing a tab view. The tab pages are a bit brighter than the normal dialogs, which seems to be correct. But unfortunately all the static controls in this tab page have the standard gray color, i.e. the one of the dialogs and not the one of the tab page. How can I make the statics look correct? Best regards
Hi Try setting the static controls' Transparent property to True in the Resource Editor. HTH Martin
-
Hi Try setting the static controls' Transparent property to True in the Resource Editor. HTH Martin
-
Hi Try setting the static controls' Transparent property to True in the Resource Editor. HTH Martin
-
Oh, btw, it's not only the statics. Also the buttons (edges), checkboxes and radios all look incorrect, all have that darker gray... The only things that look correct are the edit controls and the progress controls... Best regards
OK What are you using? VC6, VC7? Is this Tab control MFC, eg. with CPropertySheet/CPropertyPage. Is is dynamically created, or just the standard controls dragged from the toolbox onto the dialog in the resource editor? Does this happen with all tab/property pages on your machine, or just the one in your app? Martin
-
OK What are you using? VC6, VC7? Is this Tab control MFC, eg. with CPropertySheet/CPropertyPage. Is is dynamically created, or just the standard controls dragged from the toolbox onto the dialog in the resource editor? Does this happen with all tab/property pages on your machine, or just the one in your app? Martin
Martin Koorts wrote: What are you using? VC6, VC7? VC6, it's a MFC project. Martin Koorts wrote: Is this Tab control MFC, eg. with CPropertySheet/CPropertyPage. I'm not using the CPropertySheet/CPropertyPage classes. Martin Koorts wrote: Is is dynamically created, or just the standard controls dragged from the toolbox onto the dialog in the resource editor? It's just dragged from the toolbox into the dialog, using the resource editor. I'm handling the click messages on the tabs myself, to display the correct dialogs / dialog elements. I'm not using any third-party classes to do this. Martin Koorts wrote: Does this happen with all tab/property pages on your machine, or just the one in your app? It just happens in my application. In the desktop display properties for example it looks correctly. Any ideas?? Thanks for your reply and best regards
-
Martin Koorts wrote: What are you using? VC6, VC7? VC6, it's a MFC project. Martin Koorts wrote: Is this Tab control MFC, eg. with CPropertySheet/CPropertyPage. I'm not using the CPropertySheet/CPropertyPage classes. Martin Koorts wrote: Is is dynamically created, or just the standard controls dragged from the toolbox onto the dialog in the resource editor? It's just dragged from the toolbox into the dialog, using the resource editor. I'm handling the click messages on the tabs myself, to display the correct dialogs / dialog elements. I'm not using any third-party classes to do this. Martin Koorts wrote: Does this happen with all tab/property pages on your machine, or just the one in your app? It just happens in my application. In the desktop display properties for example it looks correctly. Any ideas?? Thanks for your reply and best regards
What happens if you create a Dialog-based MFC app using the wizard, with the same controls? Sorry if this messes you about, but that's just what I would try. Martin
-
Oh, btw, it's not only the statics. Also the buttons (edges), checkboxes and radios all look incorrect, all have that darker gray... The only things that look correct are the edit controls and the progress controls... Best regards
The problem that you have is that the static controls are taking the background colour of your dialog rather than the tab control. I have gotten around this problem in the past by writing an owner drawn static control. Here[^] is a good example of an owner drawn static. It may be a bit too much for what you are doing, however you could use it for ideas. Ant. I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain) -
Oh, btw, it's not only the statics. Also the buttons (edges), checkboxes and radios all look incorrect, all have that darker gray... The only things that look correct are the edit controls and the progress controls... Best regards
Have you tried altering the z-order of the controls (i.e. tab order) ? Ant. I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain) -
What happens if you create a Dialog-based MFC app using the wizard, with the same controls? Sorry if this messes you about, but that's just what I would try. Martin
Exactly the same... - Create new MFC dialog project - Drag-n-drop a tab view into the dialog - Drag-n-drop a static onto the tab view - Add a XP manifest (resource 24/1) to the project and manually add InitCommonControls() - Build and run The statics have the wrong background. Best regards, Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT) -
The problem that you have is that the static controls are taking the background colour of your dialog rather than the tab control. I have gotten around this problem in the past by writing an owner drawn static control. Here[^] is a good example of an owner drawn static. It may be a bit too much for what you are doing, however you could use it for ideas. Ant. I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)Ok, fine... But for the rest? What do I do with all the other controls that are drawn incorrectly, too? Like buttons, checkboxes and radios? Thanks and best regards, Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT) -
Hello! I've got a property page, containing a tab view. The tab pages are a bit brighter than the normal dialogs, which seems to be correct. But unfortunately all the static controls in this tab page have the standard gray color, i.e. the one of the dialogs and not the one of the tab page. How can I make the statics look correct? Best regards
See this article for a rather complex (but effective) method of correcting this. Then see the comments following the article for several easier methods.
Shog9
I'm not the Jack of Diamonds... I'm not the six of spades. I don't know what you thought; I'm not your astronaut...
-
Ok, fine... But for the rest? What do I do with all the other controls that are drawn incorrectly, too? Like buttons, checkboxes and radios? Thanks and best regards, Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT)Um, sorry about that, I should have read you post a second time to see that you do indeed mension the other controls. Since posting Shog9 has posted a reference to an article that will solve your problem. Ant. I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain) -
See this article for a rather complex (but effective) method of correcting this. Then see the comments following the article for several easier methods.
Shog9
I'm not the Jack of Diamonds... I'm not the six of spades. I don't know what you thought; I'm not your astronaut...
I like it, nice simple solution within the comments. Thanks :) Ant. I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain) -
See this article for a rather complex (but effective) method of correcting this. Then see the comments following the article for several easier methods.
Shog9
I'm not the Jack of Diamonds... I'm not the six of spades. I don't know what you thought; I'm not your astronaut...
Many thanks!!! Best regards, Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT)