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. remove space for title at top of groupbox?

remove space for title at top of groupbox?

Scheduled Pinned Locked Moved C / C++ / MFC
csharpquestionc++wpfcom
4 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.
  • P Offline
    P Offline
    permutations
    wrote on last edited by
    #1

    Is there any way to remove the space for the title at the top of a groupbox. When I use the GetWindowRect property, it's giving me a rectangle with a gap at the top. I don't want the gap - I want the dimensions of the entire group box, with title area (which I am not using). How do I get this? I found a solution for .NET here, but nothing for MFC: http://stackoverflow.com/questions/2110148/wpf-groupbox-with-no-header-space[^] Thanks in advance.

    D 1 Reply Last reply
    0
    • P permutations

      Is there any way to remove the space for the title at the top of a groupbox. When I use the GetWindowRect property, it's giving me a rectangle with a gap at the top. I don't want the gap - I want the dimensions of the entire group box, with title area (which I am not using). How do I get this? I found a solution for .NET here, but nothing for MFC: http://stackoverflow.com/questions/2110148/wpf-groupbox-with-no-header-space[^] Thanks in advance.

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      permutations wrote:

      When I use the GetWindowRect property, it's giving me a rectangle with a gap at the top. I don't want the gap - I want the dimensions of the entire group box, with title area...

      I'm obviously misunderstanding, but what is the difference between the "gap at the top" and the "title area?"

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "Man who follows car will be exhausted." - Confucius

      P 1 Reply Last reply
      0
      • D David Crow

        permutations wrote:

        When I use the GetWindowRect property, it's giving me a rectangle with a gap at the top. I don't want the gap - I want the dimensions of the entire group box, with title area...

        I'm obviously misunderstanding, but what is the difference between the "gap at the top" and the "title area?"

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "Man who follows car will be exhausted." - Confucius

        P Offline
        P Offline
        permutations
        wrote on last edited by
        #3

        No difference - I'm talking about the title area. Is there a way to style the groupbox so no space is given to the title and GetWindowRect will return the entire groupbox, all the way to the top?

        D 1 Reply Last reply
        0
        • P permutations

          No difference - I'm talking about the title area. Is there a way to style the groupbox so no space is given to the title and GetWindowRect will return the entire groupbox, all the way to the top?

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Not that I know of. You might try taking the height of the font and dividing it in half, since that's how much sticks above the group border.

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "Man who follows car will be exhausted." - Confucius

          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