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. Ruler Control

Ruler Control

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
7 Posts 4 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.
  • F Offline
    F Offline
    FranzAKlein
    wrote on last edited by
    #1

    Does anybody know how to implement a ruler control such as found when one is editing or creating a dialog in MSDEV, or know of a sample application with source code. :confused:

    L E L 3 Replies Last reply
    0
    • F FranzAKlein

      Does anybody know how to implement a ruler control such as found when one is editing or creating a dialog in MSDEV, or know of a sample application with source code. :confused:

      L Offline
      L Offline
      l a u r e n
      wrote on last edited by
      #2

      i would create a toolbar and plonk a static control on it that you resize as the toolbar resizes ... in the static you can set the mapping mode to whatever you want and draw the markings for the measurements could be other ways but hey...:suss: "every year we invent better idiot proof systems and every year they invent better idiots"

      L 1 Reply Last reply
      0
      • L l a u r e n

        i would create a toolbar and plonk a static control on it that you resize as the toolbar resizes ... in the static you can set the mapping mode to whatever you want and draw the markings for the measurements could be other ways but hey...:suss: "every year we invent better idiot proof systems and every year they invent better idiots"

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

        static control on it that you resize as the toolbar resizes And any help you can offer on the toolbar resizes? Post your code lines here please.

        L 1 Reply Last reply
        0
        • L Lost User

          static control on it that you resize as the toolbar resizes And any help you can offer on the toolbar resizes? Post your code lines here please.

          L Offline
          L Offline
          l a u r e n
          wrote on last edited by
          #4

          hmmmm check out CDialogBar ... it becomes part of the main window and doesnt float around which may be better for a ruler ... plonk the static control in and catch size change messages in the frame window and change the static control size from there it might fit ur needs more :suss: "every year we invent better idiot proof systems and every year they invent better idiots"

          L 1 Reply Last reply
          0
          • F FranzAKlein

            Does anybody know how to implement a ruler control such as found when one is editing or creating a dialog in MSDEV, or know of a sample application with source code. :confused:

            E Offline
            E Offline
            Erik Funkenbusch
            wrote on last edited by
            #5

            Wordpad! Wordpad offers just such a ruler, and it's source comes with VC++.

            1 Reply Last reply
            0
            • L l a u r e n

              hmmmm check out CDialogBar ... it becomes part of the main window and doesnt float around which may be better for a ruler ... plonk the static control in and catch size change messages in the frame window and change the static control size from there it might fit ur needs more :suss: "every year we invent better idiot proof systems and every year they invent better idiots"

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

              check out CDialogBar ... it becomes part of the main window and doesnt float around Are you sure the dialog bars don't float around, or even dock around? PS. Learn a little more before you post answers, pleeease.

              1 Reply Last reply
              0
              • F FranzAKlein

                Does anybody know how to implement a ruler control such as found when one is editing or creating a dialog in MSDEV, or know of a sample application with source code. :confused:

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

                Try this here on Codeproject: http://codeproject.com/splitter/rulers.asp

                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