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 retrieve font size of a dialog box??

How to retrieve font size of a dialog box??

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
12 Posts 5 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.
  • V vasmvr

    Hi guys, can someone tell me how i can retrieve the font size of a Static box of a dialog box? I hope someone can help me. Thanks in advance

    A Offline
    A Offline
    ashukasama
    wrote on last edited by
    #2

    CFont* fn = GetdlgItem(ID of static :)Box)->GetFont( ) :)

    V 1 Reply Last reply
    0
    • A ashukasama

      CFont* fn = GetdlgItem(ID of static :)Box)->GetFont( ) :)

      V Offline
      V Offline
      vasmvr
      wrote on last edited by
      #3

      Thanks, that's right, but how can i retrieve di dimension of the font in a int variable, to set the height of my static control?

      D 1 Reply Last reply
      0
      • V vasmvr

        Thanks, that's right, but how can i retrieve di dimension of the font in a int variable, to set the height of my static control?

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

        vasmvr wrote:

        ...how can i retrieve di dimension of the font...

        That information is contained within the LOGFONT structure.


        "A good athlete is the result of a good and worthy opponent." - David Crow

        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

        V 1 Reply Last reply
        0
        • D David Crow

          vasmvr wrote:

          ...how can i retrieve di dimension of the font...

          That information is contained within the LOGFONT structure.


          "A good athlete is the result of a good and worthy opponent." - David Crow

          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

          V Offline
          V Offline
          vasmvr
          wrote on last edited by
          #5

          How can i get this logfont?

          J A D 3 Replies Last reply
          0
          • V vasmvr

            How can i get this logfont?

            J Offline
            J Offline
            jhwurmbach
            wrote on last edited by
            #6

            CFont::GetLogFont()


            Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
            George Orwell, "Keep the Aspidistra Flying", Opening words

            1 Reply Last reply
            0
            • V vasmvr

              How can i get this logfont?

              A Offline
              A Offline
              ashukasama
              wrote on last edited by
              #7

              CFont* font = pWnd->GetFont(); if (font) { LOGFONT lf; font->GetLogFont(&lf); } :)

              1 Reply Last reply
              0
              • V vasmvr

                Hi guys, can someone tell me how i can retrieve the font size of a Static box of a dialog box? I hope someone can help me. Thanks in advance

                V Offline
                V Offline
                vasmvr
                wrote on last edited by
                #8

                Thanks all, now i have to understand why this value is negative.....and if this value is in client value

                M 1 Reply Last reply
                0
                • V vasmvr

                  Thanks all, now i have to understand why this value is negative.....and if this value is in client value

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

                  They hide that information in the documentation[^] :)

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

                  D 1 Reply Last reply
                  0
                  • V vasmvr

                    How can i get this logfont?

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

                    See here.


                    "A good athlete is the result of a good and worthy opponent." - David Crow

                    "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                    1 Reply Last reply
                    0
                    • M Mark Salsbery

                      They hide that information in the documentation[^] :)

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

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

                      Stealing Mike's thunder, eh?


                      "A good athlete is the result of a good and worthy opponent." - David Crow

                      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                      M 1 Reply Last reply
                      0
                      • D David Crow

                        Stealing Mike's thunder, eh?


                        "A good athlete is the result of a good and worthy opponent." - David Crow

                        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

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

                        Nah - not stealing...it's a tribute!

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

                        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