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. Border Width of a Control

Border Width of a Control

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    If you have a CListCtrl, and you set the option to have a border (either through the GUI interface or WM_BORDER option), how do you find the border width ?

    J C 2 Replies Last reply
    0
    • L Lost User

      If you have a CListCtrl, and you set the option to have a border (either through the GUI interface or WM_BORDER option), how do you find the border width ?

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      I haven't tried, but I think you can calculate the it by copmuting the difference in width between GetWindowRect and GetClientRect (and dividing by two.) Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

      1 Reply Last reply
      0
      • L Lost User

        If you have a CListCtrl, and you set the option to have a border (either through the GUI interface or WM_BORDER option), how do you find the border width ?

        C Offline
        C Offline
        Chad Koehler
        wrote on last edited by
        #3

        Look at ::GetSystemMetrics() in MSDN... int xBorder = GetSystemMetrics(SM_CXBORDER); int yBorder = GetSystemMetrics(SM_CYBORDER);

        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