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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to get a nonclient area rect?

How to get a nonclient area rect?

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
9 Posts 3 Posters 2 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
    generic_user_id
    wrote on last edited by
    #1

    I want to paint something outside of the client rect, but how to get that area? Who can help me out? I would like to know if there is a function that returns a CRect. Thanks

    T G 2 Replies Last reply
    0
    • G generic_user_id

      I want to paint something outside of the client rect, but how to get that area? Who can help me out? I would like to know if there is a function that returns a CRect. Thanks

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      GetWindowRect returns that. Note that returned rect is in screen coordinates. Tomasz Sowinski -- http://www.shooltz.com

      G 1 Reply Last reply
      0
      • T Tomasz Sowinski

        GetWindowRect returns that. Note that returned rect is in screen coordinates. Tomasz Sowinski -- http://www.shooltz.com

        G Offline
        G Offline
        generic_user_id
        wrote on last edited by
        #3

        Thanks, that worked

        1 Reply Last reply
        0
        • G generic_user_id

          I want to paint something outside of the client rect, but how to get that area? Who can help me out? I would like to know if there is a function that returns a CRect. Thanks

          G Offline
          G Offline
          generic_user_id
          wrote on last edited by
          #4

          How can I change the size of a Title Bar? I tried changing the CREATESTRUCT of the WM_NCCREATE message, but that didn't work... Thanks in advance

          T 1 Reply Last reply
          0
          • T Tomasz Sowinski

            WM_NCCALCSIZE ? Tomasz Sowinski -- http://www.shooltz.com

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

            "The WM_NCCALCSIZE message is sent when the size and position of a window's client area must be calculated. By processing this message, an application can control the content of the window's client area when the size or position of the window changes." - MSDN I know it must be possible, as the size of the Title Bar changes when the dialog is a 'Tool window' Can somebody please help me out? Some source code would be greatly appreciated.

            T RaviBeeR 2 Replies Last reply
            0
            • G generic_user_id

              How can I change the size of a Title Bar? I tried changing the CREATESTRUCT of the WM_NCCREATE message, but that didn't work... Thanks in advance

              T Offline
              T Offline
              Tomasz Sowinski
              wrote on last edited by
              #6

              WM_NCCALCSIZE ? Tomasz Sowinski -- http://www.shooltz.com

              G 1 Reply Last reply
              0
              • G generic_user_id

                "The WM_NCCALCSIZE message is sent when the size and position of a window's client area must be calculated. By processing this message, an application can control the content of the window's client area when the size or position of the window changes." - MSDN I know it must be possible, as the size of the Title Bar changes when the dialog is a 'Tool window' Can somebody please help me out? Some source code would be greatly appreciated.

                T Offline
                T Offline
                Tomasz Sowinski
                wrote on last edited by
                #7

                So what's the problem? Capture the message and return the client area small or big enough for given titlebar size. Tomasz Sowinski -- http://www.shooltz.com

                1 Reply Last reply
                0
                • G generic_user_id

                  "The WM_NCCALCSIZE message is sent when the size and position of a window's client area must be calculated. By processing this message, an application can control the content of the window's client area when the size or position of the window changes." - MSDN I know it must be possible, as the size of the Title Bar changes when the dialog is a 'Tool window' Can somebody please help me out? Some source code would be greatly appreciated.

                  RaviBeeR Offline
                  RaviBeeR Offline
                  RaviBee
                  wrote on last edited by
                  #8

                  See this article for funky nonclient area drawing tricks. /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

                  G 1 Reply Last reply
                  0
                  • RaviBeeR RaviBee

                    See this article for funky nonclient area drawing tricks. /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

                    G Offline
                    G Offline
                    generic_user_id
                    wrote on last edited by
                    #9

                    Thanks! That might be what I'm looking for.

                    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