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. Cursor Pos and Font size

Cursor Pos and Font size

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
8 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.
  • S Offline
    S Offline
    susanne1
    wrote on last edited by
    #1

    hi, i need to have the right cursor position , does not matter which font size is being used, for example if the ::GetCaretPos(lpCursorPos) gave me lpCursorPos-> y = 4 when the font size was 10 it must also give me 4 if the font size is changed to 72, please help. Thanks.

    D 1 Reply Last reply
    0
    • S susanne1

      hi, i need to have the right cursor position , does not matter which font size is being used, for example if the ::GetCaretPos(lpCursorPos) gave me lpCursorPos-> y = 4 when the font size was 10 it must also give me 4 if the font size is changed to 72, please help. Thanks.

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

      Ok, so what's the problem?

      "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      S 1 Reply Last reply
      0
      • D David Crow

        Ok, so what's the problem?

        "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        S Offline
        S Offline
        susanne1
        wrote on last edited by
        #3

        the problem when i change the font size, i get another y coordinate and i need to have the same coordinate for all font size from 8 to 72 , is this clear now?

        D 1 Reply Last reply
        0
        • S susanne1

          the problem when i change the font size, i get another y coordinate and i need to have the same coordinate for all font size from 8 to 72 , is this clear now?

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

          Have you tried GetSel()?

          "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          S 1 Reply Last reply
          0
          • D David Crow

            Have you tried GetSel()?

            "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            S Offline
            S Offline
            susanne1
            wrote on last edited by
            #5

            i am using CRichEidtView Class it does not have GetSel(), i need to get the font hight which is NOW used to display the text and every time this font size changed i must get the the actual font size , textMetric may be help but i need to initalize a CClientDC or CDC , in CRichEditView Class this diffecult.

            _ D 2 Replies Last reply
            0
            • S susanne1

              i am using CRichEidtView Class it does not have GetSel(), i need to get the font hight which is NOW used to display the text and every time this font size changed i must get the the actual font size , textMetric may be help but i need to initalize a CClientDC or CDC , in CRichEditView Class this diffecult.

              _ Offline
              _ Offline
              _Superman_
              wrote on last edited by
              #6

              richEditView.GetRichEditCtrl().GetSel

              «_Superman_» I love work. It gives me something to do between weekends.

              S 1 Reply Last reply
              0
              • _ _Superman_

                richEditView.GetRichEditCtrl().GetSel

                «_Superman_» I love work. It gives me something to do between weekends.

                S Offline
                S Offline
                susanne1
                wrote on last edited by
                #7

                okay this sounds good i will try thanks.

                1 Reply Last reply
                0
                • S susanne1

                  i am using CRichEidtView Class it does not have GetSel(), i need to get the font hight which is NOW used to display the text and every time this font size changed i must get the the actual font size , textMetric may be help but i need to initalize a CClientDC or CDC , in CRichEditView Class this diffecult.

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

                  susanne1 wrote:

                  i am using CRichEidtView Class it does not have GetSel()...

                  Sure it does.

                  "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  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