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. Modify text color

Modify text color

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
9 Posts 3 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.
  • M Offline
    M Offline
    Maer727
    wrote on last edited by
    #1

    - How to modify the color of the caption of a button(not including the background of the button)? - Regards, Maer

    P 1 Reply Last reply
    0
    • M Maer727

      - How to modify the color of the caption of a button(not including the background of the button)? - Regards, Maer

      P Offline
      P Offline
      Paolo Messina
      wrote on last edited by
      #2

      Two ideas: - handle WM_CTLCOLORBTN (MSDN: "By responding to this message, the parent window can set a button's text and background colors") - use ownerdraw buttons (see BS_OWNERDRAW) Paolo ------ "airplane is cool, but space shuttle is even better" (J. Kaczorowski)

      N M 2 Replies Last reply
      0
      • P Paolo Messina

        Two ideas: - handle WM_CTLCOLORBTN (MSDN: "By responding to this message, the parent window can set a button's text and background colors") - use ownerdraw buttons (see BS_OWNERDRAW) Paolo ------ "airplane is cool, but space shuttle is even better" (J. Kaczorowski)

        M Offline
        M Offline
        Maer727
        wrote on last edited by
        #3

        - Thanks, Paolo pal! - I have never used "WM_CTLCOLORBTN" before (even not heard it). Since I am a newbie, can you show me an example? - Have a nice weekend, Maer

        N 1 Reply Last reply
        0
        • P Paolo Messina

          Two ideas: - handle WM_CTLCOLORBTN (MSDN: "By responding to this message, the parent window can set a button's text and background colors") - use ownerdraw buttons (see BS_OWNERDRAW) Paolo ------ "airplane is cool, but space shuttle is even better" (J. Kaczorowski)

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #4

          See this link:- http://support.microsoft.com/support/kb/articles/Q130/9/52.ASP WM_CTLCOLORBTN is not valid anymore.....

          M 1 Reply Last reply
          0
          • M Maer727

            - Thanks, Paolo pal! - I have never used "WM_CTLCOLORBTN" before (even not heard it). Since I am a newbie, can you show me an example? - Have a nice weekend, Maer

            N Offline
            N Offline
            Nish Nishant
            wrote on last edited by
            #5

            See this link:- http://support.microsoft.com/support/kb/articles/Q130/9/52.ASP WM_CTLCOLORBTN is not valid anymore..... p.s. I first put this in the wrong thread... :-)

            1 Reply Last reply
            0
            • N Nish Nishant

              See this link:- http://support.microsoft.com/support/kb/articles/Q130/9/52.ASP WM_CTLCOLORBTN is not valid anymore.....

              M Offline
              M Offline
              Maer727
              wrote on last edited by
              #6

              - Thanks for your URL, Nish pal! - I have never used the messages before, can you show me an example about the useage? - Have a nice weekend, Maer

              M 1 Reply Last reply
              0
              • M Maer727

                - Thanks for your URL, Nish pal! - I have never used the messages before, can you show me an example about the useage? - Have a nice weekend, Maer

                M Offline
                M Offline
                Maer727
                wrote on last edited by
                #7

                - Sorry for interrupting again, Nish pal! - I still have a question. After reading the article you introduced to me, it seems that we can not use these messages now. Are there any other methods to change the color of the caption of the button? - Have a nice weekend, Maer

                N 1 Reply Last reply
                0
                • M Maer727

                  - Sorry for interrupting again, Nish pal! - I still have a question. After reading the article you introduced to me, it seems that we can not use these messages now. Are there any other methods to change the color of the caption of the button? - Have a nice weekend, Maer

                  N Offline
                  N Offline
                  Nish Nishant
                  wrote on last edited by
                  #8

                  see this link http://www.codeproject.com/buttonctrl/cbuttonst.asp Nish Sonork ID 100.9786 voidmain

                  M 1 Reply Last reply
                  0
                  • N Nish Nishant

                    see this link http://www.codeproject.com/buttonctrl/cbuttonst.asp Nish Sonork ID 100.9786 voidmain

                    M Offline
                    M Offline
                    Maer727
                    wrote on last edited by
                    #9

                    - Thanks pal! - The article will be great help to me. - Have a nice day, Maer

                    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