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

WM_CTLCOLOR

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
6 Posts 4 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.
  • G Offline
    G Offline
    gucy
    wrote on last edited by
    #1

    can anybody tell me something different between WM_CTLCOLOR and =WM_CTLCOLOR in mfc? gucy

    V T R 3 Replies Last reply
    0
    • G gucy

      can anybody tell me something different between WM_CTLCOLOR and =WM_CTLCOLOR in mfc? gucy

      V Offline
      V Offline
      Vipin Bokariya
      wrote on last edited by
      #2

      The WM_CTLCOLOR message is used in 16-bit versions of Windows to change the color scheme of list boxes, the list boxes of combo boxes, button controls, edit controls, static controls, message boxes, and dialog boxes. If an application processes this message, it returns a handle to a brush. The system uses the brush to paint the background of the control =WM_CTLCOLOR In classwizard WM_CTLCOLOR will appear as "=WM_CTLCOLOR"

      1 Reply Last reply
      0
      • G gucy

        can anybody tell me something different between WM_CTLCOLOR and =WM_CTLCOLOR in mfc? gucy

        T Offline
        T Offline
        Toni78
        wrote on last edited by
        #3

        This has to do with subclassing of controls. I really can't elaborate that much on the topic because I have used it only once and I hardly remember it, but go to MSDN and search for subclassing. // Afterall, I realized that even my comment lines have bugs

        1 Reply Last reply
        0
        • G gucy

          can anybody tell me something different between WM_CTLCOLOR and =WM_CTLCOLOR in mfc? gucy

          R Offline
          R Offline
          Ryan Binns
          wrote on last edited by
          #4

          WM_CTLCOLOR is the Windows message sent to the parent of a control. MFC allows the control itself to handle some messages that are actually sent to its parent. This is called message reflection, and WM_CTLCOLOR is one of these messages. If you handle WM_CTLCOLOR in a particular window (eg. myWindow), then you handle a message sent from one of myWindow's children. If you handle =WM_CTLCOLOR, you handle a message that was sent from myWindow to its parent. I hope this is clear enough to understand :) Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
          Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

          G 1 Reply Last reply
          0
          • R Ryan Binns

            WM_CTLCOLOR is the Windows message sent to the parent of a control. MFC allows the control itself to handle some messages that are actually sent to its parent. This is called message reflection, and WM_CTLCOLOR is one of these messages. If you handle WM_CTLCOLOR in a particular window (eg. myWindow), then you handle a message sent from one of myWindow's children. If you handle =WM_CTLCOLOR, you handle a message that was sent from myWindow to its parent. I hope this is clear enough to understand :) Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
            Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

            G Offline
            G Offline
            gucy
            wrote on last edited by
            #5

            your descprition is clear enough for me to understand.thank you! gucy

            R 1 Reply Last reply
            0
            • G gucy

              your descprition is clear enough for me to understand.thank you! gucy

              R Offline
              R Offline
              Ryan Binns
              wrote on last edited by
              #6

              You're welcome :) Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
              Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

              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