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. Static font

Static font

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
11 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.
  • N NewVC

    Hi All How can set the satic text size?I want to set the static text which is written by ne.Plz help me

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

    You can use of CreateFont and after make your font you can use of SetFont.(you need change id of staticfont).

    N 1 Reply Last reply
    0
    • H Hamid Taebi

      You can use of CreateFont and after make your font you can use of SetFont.(you need change id of staticfont).

      N Offline
      N Offline
      NewVC
      wrote on last edited by
      #3

      can you give me some line of example.

      H 1 Reply Last reply
      0
      • N NewVC

        can you give me some line of example.

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

        CFont m2; m2.CreateFontA(20,0,0,0,FW_NORMAL,FALSE,FALSE,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH | FF_SWISS,_T("System")); GetDlgItem(IDC_STATIC2)->SetFont(&m2);

        N 1 Reply Last reply
        0
        • H Hamid Taebi

          CFont m2; m2.CreateFontA(20,0,0,0,FW_NORMAL,FALSE,FALSE,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH | FF_SWISS,_T("System")); GetDlgItem(IDC_STATIC2)->SetFont(&m2);

          N Offline
          N Offline
          NewVC
          wrote on last edited by
          #5

          thanks it's working

          H 1 Reply Last reply
          0
          • N NewVC

            thanks it's working

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

            :-D

            N 1 Reply Last reply
            0
            • H Hamid Taebi

              :-D

              N Offline
              N Offline
              NewVC
              wrote on last edited by
              #7

              one little problem it's showing char highlited and i want show in nornal font.

              L H 2 Replies Last reply
              0
              • N NewVC

                one little problem it's showing char highlited and i want show in nornal font.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #8

                NewVC++ wrote:

                one little problem it's showing char highlited and i want show in nornal font.

                Not sure what you mean but if your looking for the default dialog font it can be obtained by changing the font face to: _T("MS Shell Dlg 2") which is a Logical Font[^] that maps to default font used throughout the operating system on Windows 2000 and later. Best Wishes, -David Delaune

                1 Reply Last reply
                0
                • N NewVC

                  one little problem it's showing char highlited and i want show in nornal font.

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

                  Can you more explain what is highlited ?

                  Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

                  N 1 Reply Last reply
                  0
                  • H Hamid Taebi

                    Can you more explain what is highlited ?

                    Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

                    N Offline
                    N Offline
                    NewVC
                    wrote on last edited by
                    #10

                    I have static text more than one.And i set the font only one static text.Every things is working fine but problem is that it's showing highlited in related to other static text.But i want to set only it's size and all things i want to show nornmal as like all normal satic text show.Plz help me Thanks in advance

                    H 1 Reply Last reply
                    0
                    • N NewVC

                      I have static text more than one.And i set the font only one static text.Every things is working fine but problem is that it's showing highlited in related to other static text.But i want to set only it's size and all things i want to show nornmal as like all normal satic text show.Plz help me Thanks in advance

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

                      I need to see your project.showing highlited??

                      Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

                      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