Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Statics in tab pages on WinXP?

Statics in tab pages on WinXP?

Scheduled Pinned Locked Moved C / C++ / MFC
question
15 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    One Stone
    wrote on last edited by
    #1

    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

    M S 2 Replies Last reply
    0
    • O One Stone

      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

      M Offline
      M Offline
      Martin Koorts
      wrote on last edited by
      #2

      Hi Try setting the static controls' Transparent property to True in the Resource Editor. HTH Martin

      O 2 Replies Last reply
      0
      • M Martin Koorts

        Hi Try setting the static controls' Transparent property to True in the Resource Editor. HTH Martin

        O Offline
        O Offline
        One Stone
        wrote on last edited by
        #3

        I've tried this, but the static looks exactly the same as before, with the darker gray... Any other ideas? Thanks and best regards

        1 Reply Last reply
        0
        • M Martin Koorts

          Hi Try setting the static controls' Transparent property to True in the Resource Editor. HTH Martin

          O Offline
          O Offline
          One Stone
          wrote on last edited by
          #4

          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

          M A 3 Replies Last reply
          0
          • O One Stone

            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

            M Offline
            M Offline
            Martin Koorts
            wrote on last edited by
            #5

            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

            O 1 Reply Last reply
            0
            • M Martin Koorts

              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

              O Offline
              O Offline
              One Stone
              wrote on last edited by
              #6

              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

              M 1 Reply Last reply
              0
              • O One Stone

                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

                M Offline
                M Offline
                Martin Koorts
                wrote on last edited by
                #7

                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

                D 1 Reply Last reply
                0
                • O One Stone

                  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

                  A Offline
                  A Offline
                  Antony M Kancidrowski
                  wrote on last edited by
                  #8

                  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)

                  D 1 Reply Last reply
                  0
                  • O One Stone

                    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

                    A Offline
                    A Offline
                    Antony M Kancidrowski
                    wrote on last edited by
                    #9

                    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)

                    1 Reply Last reply
                    0
                    • M Martin Koorts

                      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

                      D Offline
                      D Offline
                      Dominik Reichl
                      wrote on last edited by
                      #10

                      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)

                      1 Reply Last reply
                      0
                      • A Antony M Kancidrowski

                        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)

                        D Offline
                        D Offline
                        Dominik Reichl
                        wrote on last edited by
                        #11

                        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)

                        A 1 Reply Last reply
                        0
                        • O One Stone

                          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

                          S Offline
                          S Offline
                          Shog9 0
                          wrote on last edited by
                          #12

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

                          A D 2 Replies Last reply
                          0
                          • D Dominik Reichl

                            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)

                            A Offline
                            A Offline
                            Antony M Kancidrowski
                            wrote on last edited by
                            #13

                            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)

                            1 Reply Last reply
                            0
                            • S Shog9 0

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

                              A Offline
                              A Offline
                              Antony M Kancidrowski
                              wrote on last edited by
                              #14

                              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)

                              1 Reply Last reply
                              0
                              • S Shog9 0

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

                                D Offline
                                D Offline
                                Dominik Reichl
                                wrote on last edited by
                                #15

                                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)

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • World
                                • Users
                                • Groups