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. CSliderCtrl

CSliderCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
debuggingquestiondiscussion
10 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.
  • J Offline
    J Offline
    jung kreidler
    wrote on last edited by
    #1

    Hi all, I have a dialog with some sliders on it. The slider are derived from CSliderCtrl. I try to catch the LButtonDblClk message within my CSliderCtrl derived class, but the message does not arrive (Breakpoint is never hit). In the dialog the double click appears (breakpoint is hit), but only in case I click outside the slider controls. In case I click inside the slider controls nothing happens... Any thoughts? Regards, jung-kreidler

    L S 2 Replies Last reply
    0
    • J jung kreidler

      Hi all, I have a dialog with some sliders on it. The slider are derived from CSliderCtrl. I try to catch the LButtonDblClk message within my CSliderCtrl derived class, but the message does not arrive (Breakpoint is never hit). In the dialog the double click appears (breakpoint is hit), but only in case I click outside the slider controls. In case I click inside the slider controls nothing happens... Any thoughts? Regards, jung-kreidler

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      jung-kreidler wrote:

      I try to catch the LButtonDblClk message within my CSliderCtrl derived class

      How? Post the relevant code that is responsible. Also I am not seeing any support for such a message in the documentation. Where have you seen information stating it does?

      modified on Thursday, July 2, 2009 10:27 AM

      J 1 Reply Last reply
      0
      • L led mike

        jung-kreidler wrote:

        I try to catch the LButtonDblClk message within my CSliderCtrl derived class

        How? Post the relevant code that is responsible. Also I am not seeing any support for such a message in the documentation. Where have you seen information stating it does?

        modified on Thursday, July 2, 2009 10:27 AM

        J Offline
        J Offline
        jung kreidler
        wrote on last edited by
        #3

        :confused::confused::confused: The WM_LBUTTONDBLCLK can be handled with the message handler: BEGIN_MESSAGE_MAP(MSlider, CSliderCtrl) ON_WM_LBUTTONDBLCLK() END_MESSAGE_MAP() void MSlider::OnLButtonDblClk(UINT nFlags, CPoint point) { CSliderCtrl::OnLButtonDblClk(nFlags, point); } ...guess you have seen such piece of code already...

        C 1 Reply Last reply
        0
        • J jung kreidler

          :confused::confused::confused: The WM_LBUTTONDBLCLK can be handled with the message handler: BEGIN_MESSAGE_MAP(MSlider, CSliderCtrl) ON_WM_LBUTTONDBLCLK() END_MESSAGE_MAP() void MSlider::OnLButtonDblClk(UINT nFlags, CPoint point) { CSliderCtrl::OnLButtonDblClk(nFlags, point); } ...guess you have seen such piece of code already...

          C Offline
          C Offline
          Chandrasekharan P
          wrote on last edited by
          #4

          jung-kreidler wrote:

          ON_WM_LBUTTONDBLCLK()

          did u manually add this or using Class Wizard?

          J 1 Reply Last reply
          0
          • C Chandrasekharan P

            jung-kreidler wrote:

            ON_WM_LBUTTONDBLCLK()

            did u manually add this or using Class Wizard?

            J Offline
            J Offline
            jung kreidler
            wrote on last edited by
            #5

            VS2008 automatic: Select class in Class View, Open Properties, Select Messages List, Add blahblah I think it is of no relevance in what way the code has been added. The question is, why the breakpoint never gets hit in case I double click on the slider.

            1 Reply Last reply
            0
            • J jung kreidler

              Hi all, I have a dialog with some sliders on it. The slider are derived from CSliderCtrl. I try to catch the LButtonDblClk message within my CSliderCtrl derived class, but the message does not arrive (Breakpoint is never hit). In the dialog the double click appears (breakpoint is hit), but only in case I click outside the slider controls. In case I click inside the slider controls nothing happens... Any thoughts? Regards, jung-kreidler

              S Offline
              S Offline
              SandipG
              wrote on last edited by
              #6

              With following code i was able to get double click message in my Slider control. I hope it works for you.

              DWORD dwClssStyle = ::GetClassLong(m\_slider.m\_hWnd, GCL\_STYLE);
              dwClssStyle |= CS\_DBLCLKS;
              dwClssStyle = ::SetClassLong(m\_slider.m\_hWnd, GCL\_STYLE, (LONG)dwClssStyle);
              

              Regards, Sandip.

              J L 2 Replies Last reply
              0
              • S SandipG

                With following code i was able to get double click message in my Slider control. I hope it works for you.

                DWORD dwClssStyle = ::GetClassLong(m\_slider.m\_hWnd, GCL\_STYLE);
                dwClssStyle |= CS\_DBLCLKS;
                dwClssStyle = ::SetClassLong(m\_slider.m\_hWnd, GCL\_STYLE, (LONG)dwClssStyle);
                

                Regards, Sandip.

                J Offline
                J Offline
                jung kreidler
                wrote on last edited by
                #7

                :laugh: Yep, that's it. Thank you.

                1 Reply Last reply
                0
                • S SandipG

                  With following code i was able to get double click message in my Slider control. I hope it works for you.

                  DWORD dwClssStyle = ::GetClassLong(m\_slider.m\_hWnd, GCL\_STYLE);
                  dwClssStyle |= CS\_DBLCLKS;
                  dwClssStyle = ::SetClassLong(m\_slider.m\_hWnd, GCL\_STYLE, (LONG)dwClssStyle);
                  

                  Regards, Sandip.

                  L Offline
                  L Offline
                  led mike
                  wrote on last edited by
                  #8

                  Nice!

                  S 1 Reply Last reply
                  0
                  • L led mike

                    Nice!

                    S Offline
                    S Offline
                    SandipG
                    wrote on last edited by
                    #9

                    Thanks :) I never thought any one would follow up such old message..:thumbsup:

                    Regards, Sandip.

                    L 1 Reply Last reply
                    0
                    • S SandipG

                      Thanks :) I never thought any one would follow up such old message..:thumbsup:

                      Regards, Sandip.

                      L Offline
                      L Offline
                      led mike
                      wrote on last edited by
                      #10

                      I was on vacation :-D Today is my first day back on CP in almost 3 weeks.

                      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