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 draw horizontal line in dialog

How to draw horizontal line in dialog

Scheduled Pinned Locked Moved C / C++ / MFC
toolshelptutorialquestion
10 Posts 6 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.
  • C Offline
    C Offline
    CoolASL
    wrote on last edited by
    #1

    Hi, I wish to draw a horizontal line in a dialog to delimit two sets of controls. But i cannot find any such thing on the tools panel. Can anyone please help me out with that ? Thanks in advance.

    *** Who said nothing is impossible? I have been doing it for a long time ***

    C _ S H M 5 Replies Last reply
    0
    • C CoolASL

      Hi, I wish to draw a horizontal line in a dialog to delimit two sets of controls. But i cannot find any such thing on the tools panel. Can anyone please help me out with that ? Thanks in advance.

      *** Who said nothing is impossible? I have been doing it for a long time ***

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      What I do generally (but maybe it's not the cleanest solution) is to put a picture control and reduce its vertical size to the minimum. Then I open the property dialog (right click on the control -> property) and I modify the style to be sunken. Like that you have a nice line.


      Cédric Moonen Software developer
      Charting control [Updated - v1.1]

      C 1 Reply Last reply
      0
      • C Cedric Moonen

        What I do generally (but maybe it's not the cleanest solution) is to put a picture control and reduce its vertical size to the minimum. Then I open the property dialog (right click on the control -> property) and I modify the style to be sunken. Like that you have a nice line.


        Cédric Moonen Software developer
        Charting control [Updated - v1.1]

        C Offline
        C Offline
        CoolASL
        wrote on last edited by
        #3

        Thanks Cedric. that's a pretty nice trick. Thanks a lot.

        *** Who said nothing is impossible? I have been doing it for a long time ***

        1 Reply Last reply
        0
        • C CoolASL

          Hi, I wish to draw a horizontal line in a dialog to delimit two sets of controls. But i cannot find any such thing on the tools panel. Can anyone please help me out with that ? Thanks in advance.

          *** Who said nothing is impossible? I have been doing it for a long time ***

          _ Offline
          _ Offline
          _AnsHUMAN_
          wrote on last edited by
          #4

          CoolASL wrote:

          draw a horizontal line in a dialog

          You can also do this:

          HDC hdc=::GetDC (m_hWnd);
          ::MoveToEx (hdc,10,10,NULL);
          ::LineTo (hdc,100,10);
          ::ReleaseDC (m_hWnd,hdc);
          

          Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

          1 Reply Last reply
          0
          • C CoolASL

            Hi, I wish to draw a horizontal line in a dialog to delimit two sets of controls. But i cannot find any such thing on the tools panel. Can anyone please help me out with that ? Thanks in advance.

            *** Who said nothing is impossible? I have been doing it for a long time ***

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

            Hi, You better use group control you can group the set of controls with this.

            C 1 Reply Last reply
            0
            • C CoolASL

              Hi, I wish to draw a horizontal line in a dialog to delimit two sets of controls. But i cannot find any such thing on the tools panel. Can anyone please help me out with that ? Thanks in advance.

              *** Who said nothing is impossible? I have been doing it for a long time ***

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

              or you can use from a Static control with set Type to Etched Horz

              _**


              **_

              WhiteSky


              C 1 Reply Last reply
              0
              • H Hamid Taebi

                or you can use from a Static control with set Type to Etched Horz

                _**


                **_

                WhiteSky


                C Offline
                C Offline
                CoolASL
                wrote on last edited by
                #7

                hi WhiteSky.. Thanks for the response. Sorry, i couldnt get that property. Can you please specify which VS version you are using. I am using 2003. Or is it that i am not looking in the right place. Thanks.

                *** Who said nothing is impossible? I have been doing it for a long time ***

                H 1 Reply Last reply
                0
                • C CoolASL

                  hi WhiteSky.. Thanks for the response. Sorry, i couldnt get that property. Can you please specify which VS version you are using. I am using 2003. Or is it that i am not looking in the right place. Thanks.

                  *** Who said nothing is impossible? I have been doing it for a long time ***

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

                  When you insert picture control in your dialog then in property window set parameter Type->Etched Horz

                  _**


                  **_

                  WhiteSky


                  1 Reply Last reply
                  0
                  • S sheshidar

                    Hi, You better use group control you can group the set of controls with this.

                    C Offline
                    C Offline
                    CoolASL
                    wrote on last edited by
                    #9

                    thanks man.

                    *** Who said nothing is impossible? I have been doing it for a long time ***

                    1 Reply Last reply
                    0
                    • C CoolASL

                      Hi, I wish to draw a horizontal line in a dialog to delimit two sets of controls. But i cannot find any such thing on the tools panel. Can anyone please help me out with that ? Thanks in advance.

                      *** Who said nothing is impossible? I have been doing it for a long time ***

                      M Offline
                      M Offline
                      MIAN KAMRAN
                      wrote on last edited by
                      #10

                      CPen pen(RGB(0,0,0)); CClientDC ccd(this); ccd.SelectObject(&pen); ccd.MoveTo(0,240); ccd.LineTo(x,y);:)

                      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