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. Change EditBox Font in MFC

Change EditBox Font in MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
5 Posts 3 Posters 1 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.
  • J Offline
    J Offline
    Janani93
    wrote on last edited by
    #1

    Hi everyone I am new to this i donot know how to change font of a editcontrol in MFC.How to do it.

    L 1 Reply Last reply
    0
    • J Janani93

      Hi everyone I am new to this i donot know how to change font of a editcontrol in MFC.How to do it.

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

      Assuming you are talking about a CEdit control, you can use the SetFont[^] method.

      J 1 Reply Last reply
      0
      • L Lost User

        Assuming you are talking about a CEdit control, you can use the SetFont[^] method.

        J Offline
        J Offline
        Janani93
        wrote on last edited by
        #3

        yes you are correct any examples for that one...

        L B 2 Replies Last reply
        0
        • J Janani93

          yes you are correct any examples for that one...

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

          Probably plenty if you go and search. However, it is not really too difficult to create a CFont object and use that as shown in the documentation.

          1 Reply Last reply
          0
          • J Janani93

            yes you are correct any examples for that one...

            B Offline
            B Offline
            Bram van Kampen
            wrote on last edited by
            #5

            A bit of History These days it is quite simple. A lot of the complication about fonts arose during the 1990's, the Font Wars. Various companies claimed copyright over their named fonts. That is absolutely No problems if the fonts you use are on the same computer that you write your software on, Your Computer. Difficulties arise however, if you write a document in a set of fonts, try to load and print it on another computer, which may not have a Font installed by the same Name. Microsoft tried to resolve the issue, by trying to get the Closest Comparable Font. and included a structure which contains obscure Font designer Lingo terms, such as 'Internal Kerning'. That War was won by Microsoft, Fonts can now be downloaded for free. Things have simplified by now. Just specify Type Name, Style (Straight/Italic/Bold) and a Point Size. That is all that is required these days. Regards :)

            Bram van Kampen

            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