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. How to fully custom draw combobox control, edit, arrow button and listbox included?

How to fully custom draw combobox control, edit, arrow button and listbox included?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
5 Posts 2 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.
  • K Offline
    K Offline
    kcynic
    wrote on last edited by
    #1

    I want to fully draw combobox control by myself, not only the list items. I searched but only found some demos about how to custom draw its subitems. But I really want to draw the edit, arrow button and listbox of the combobox completely. So, is there any example or idea? Regards

    C 1 Reply Last reply
    0
    • K kcynic

      I want to fully draw combobox control by myself, not only the list items. I searched but only found some demos about how to custom draw its subitems. But I really want to draw the edit, arrow button and listbox of the combobox completely. So, is there any example or idea? Regards

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      I'd say, subclass the combo box and all the controls inside it (list, edit...) and handle WM_PAINT, WM_ERASEBKGND and somesuch. Or write your own complete control from scratch.

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Sometimes you just have to hate coding to do it well. <

      K 1 Reply Last reply
      0
      • C Code o mat

        I'd say, subclass the combo box and all the controls inside it (list, edit...) and handle WM_PAINT, WM_ERASEBKGND and somesuch. Or write your own complete control from scratch.

        > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Sometimes you just have to hate coding to do it well. <

        K Offline
        K Offline
        kcynic
        wrote on last edited by
        #3

        You means, just subclass all its three subitems? but if use its ownerdraw property?

        C K 2 Replies Last reply
        0
        • K kcynic

          You means, just subclass all its three subitems? but if use its ownerdraw property?

          C Offline
          C Offline
          Code o mat
          wrote on last edited by
          #4

          I don't understand what you mean...

          > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Sometimes you just have to hate coding to do it well. <

          1 Reply Last reply
          0
          • K kcynic

            You means, just subclass all its three subitems? but if use its ownerdraw property?

            K Offline
            K Offline
            kcynic
            wrote on last edited by
            #5

            I meant, how to use WM_MEASUREITEM and WM_DRAWITEM messages handler if i subclass its edit, button and listbox.

            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