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

Borderless ComboBox

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
8 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.
  • H Offline
    H Offline
    Humayun Kabir Hemoo
    wrote on last edited by
    #1

    Can any on tell me how to remove borders from a Combobox. I tried SetWindowRegion, it worked for Edit control, but it did not work with Combobox Thanx :sigh:

    Md. Humayuon Kabir Hemoo

    modified on Saturday, February 16, 2008 12:55 PM

    M H 2 Replies Last reply
    0
    • H Humayun Kabir Hemoo

      Can any on tell me how to remove borders from a Combobox. I tried SetWindowRegion, it worked for Edit control, but it did not work with Combobox Thanx :sigh:

      Md. Humayuon Kabir Hemoo

      modified on Saturday, February 16, 2008 12:55 PM

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      You could try removing any border styles from the window styles associated with the control. If a control's painting implementation ignores the style then you have no choice but to draw the control yourself. MArk

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      H 1 Reply Last reply
      0
      • M Mark Salsbery

        You could try removing any border styles from the window styles associated with the control. If a control's painting implementation ignores the style then you have no choice but to draw the control yourself. MArk

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        H Offline
        H Offline
        Humayun Kabir Hemoo
        wrote on last edited by
        #3

        Hi Mark, Thanks for your response. It seemes I need to draw the combobox my self. But don't you think SetWindowRegion should set the painting area of a control? Humayoun

        Md. Humayuon Kabir Hemoo

        M 1 Reply Last reply
        0
        • H Humayun Kabir Hemoo

          Hi Mark, Thanks for your response. It seemes I need to draw the combobox my self. But don't you think SetWindowRegion should set the painting area of a control? Humayoun

          Md. Humayuon Kabir Hemoo

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          Humayun Kabir Hemoo wrote:

          But don't you think SetWindowRegion should set the painting area of a control?

          Not necessarily.  The control draws itself just like any other window. Whether the control sets its own region or not, or honors any of the styles you create it with, depends on the implementation. Mark

          Mark Salsbery Microsoft MVP - Visual C++ :java:

          H 1 Reply Last reply
          0
          • H Humayun Kabir Hemoo

            Can any on tell me how to remove borders from a Combobox. I tried SetWindowRegion, it worked for Edit control, but it did not work with Combobox Thanx :sigh:

            Md. Humayuon Kabir Hemoo

            modified on Saturday, February 16, 2008 12:55 PM

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #5

            Do you want to customize combobox or remove border of it?

            H 1 Reply Last reply
            0
            • H Hamid Taebi

              Do you want to customize combobox or remove border of it?

              H Offline
              H Offline
              Humayun Kabir Hemoo
              wrote on last edited by
              #6

              I want to remove the border.

              Md. Humayuon Kabir Hemoo

              H 1 Reply Last reply
              0
              • M Mark Salsbery

                Humayun Kabir Hemoo wrote:

                But don't you think SetWindowRegion should set the painting area of a control?

                Not necessarily.  The control draws itself just like any other window. Whether the control sets its own region or not, or honors any of the styles you create it with, depends on the implementation. Mark

                Mark Salsbery Microsoft MVP - Visual C++ :java:

                H Offline
                H Offline
                Humayun Kabir Hemoo
                wrote on last edited by
                #7

                I didn't know this before, thanx. By the way, removing WS_BORDER didn't work.

                Md. Humayuon Kabir Hemoo

                1 Reply Last reply
                0
                • H Humayun Kabir Hemoo

                  I want to remove the border.

                  Md. Humayuon Kabir Hemoo

                  H Offline
                  H Offline
                  Hamid Taebi
                  wrote on last edited by
                  #8

                  So you can use of property window of combobox or use of ModifyStyle(....) for remove each style that you dont want it.

                  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