CSliderCtrl
-
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
-
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
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
-
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
: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...
-
: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...
jung-kreidler wrote:
ON_WM_LBUTTONDBLCLK()
did u manually add this or using Class Wizard?
-
jung-kreidler wrote:
ON_WM_LBUTTONDBLCLK()
did u manually add this or using Class Wizard?
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.
-
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
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.
-
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.
:laugh: Yep, that's it. Thank you.
-
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.
-
Thanks :) I never thought any one would follow up such old message..:thumbsup:
Regards, Sandip.