Click here to Skip to main content
15,031,207 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Printer Control Pin
Bram van Kampen4-Sep-16 15:30
MemberBram van Kampen4-Sep-16 15:30 
GeneralRe: Printer Control Pin
Richard MacCutchan4-Sep-16 21:39
mveRichard MacCutchan4-Sep-16 21:39 
GeneralRe: Printer Control Pin
Bram van Kampen6-Sep-16 16:03
MemberBram van Kampen6-Sep-16 16:03 
GeneralRe: Printer Control Pin
Richard MacCutchan6-Sep-16 21:35
mveRichard MacCutchan6-Sep-16 21:35 
GeneralRe: Printer Control Pin
Bram van Kampen8-Sep-16 14:18
MemberBram van Kampen8-Sep-16 14:18 
GeneralRe: Printer Control Pin
Richard MacCutchan8-Sep-16 22:37
mveRichard MacCutchan8-Sep-16 22:37 
GeneralRe: Printer Control Pin
Richard MacCutchan4-Sep-16 22:40
mveRichard MacCutchan4-Sep-16 22:40 
QuestionCustom Slider control messages cannot be caught Pin
AlbertB25-Aug-16 2:54
MemberAlbertB25-Aug-16 2:54 
I have a custom rotary slider control inheriting from CSliderCtrl. Its own behaviour is fine, it displays as I want, responds to mouse dragging and rotates just as it should. Then I want to interact with it from its parent dialog and the problems start.

I had imagined that I would just have to trap the ON_VSCROLL message to obtain its value as it changes. (It is set up with Orientation: Vertical though I have tried Horizontal too.) I can't trap ON_VSCROLL or ON_HSCROLL with either setting. I have tried catching NM_RELEASEDCAPTURE and can't get that either. I have:
BEGIN_MESSAGE_MAP(CNewPatchDlg, CDialog)
	ON_WM_HSCROLL()
	ON_WM_VSCROLL()
	ON_NOTIFY(NM_RELEASEDCAPTURE, IDC_VOLUME, OnReleasedCapture)
END_MESSAGE_MAP()

in my dialog message map and
void CNewPatchDlg::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
void CNewPatchDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
void CGm36NewPatchDlg::OnReleasedCapture(NMHDR* pNMHDR, LRESULT* pResult)

declared and defined in my dialog .h and .cpp files. They exist as temporary function stubs with a little junk code in there to just see whether I can hit breakpoints in the functions. None get hit.

In the dialog editor the wizard shows only four control events available for the control, NM_CUSTOMDRAW, NM_OUTOFMEMORY, NM_RELEASEDCAPTURE, NM_THEMECHANGED. I expected to see more than that! I would have thought at least I could have accessed ON_VSCROLL via the wizard though a standard CSliderCtrl shows the same four options.

I know sometimes these controls can be a little eccentric but I thought this would be pretty plain sailing. I've dug around and found a couple of suggestions that I'm not the only person to have this issue with a Custom slider but no one seems to have a solution, only to use ON_HSCROLL or ON_VSCROLL which I can't seem to do. This must be something very simple I am seeing wrong. Can anyone suggest what I am missing?
AnswerRe: Custom Slider control messages cannot be caught Pin
Richard MacCutchan25-Aug-16 3:47
mveRichard MacCutchan25-Aug-16 3:47 
GeneralRe: Custom Slider control messages cannot be caught Pin
AlbertB25-Aug-16 4:39
MemberAlbertB25-Aug-16 4:39 
GeneralRe: Custom Slider control messages cannot be caught Pin
Richard MacCutchan25-Aug-16 4:59
mveRichard MacCutchan25-Aug-16 4:59 
GeneralRe: Custom Slider control messages cannot be caught Pin
AlbertB25-Aug-16 5:54
MemberAlbertB25-Aug-16 5:54 
GeneralRe: Custom Slider control messages cannot be caught Pin
Bram van Kampen27-Aug-16 16:23
MemberBram van Kampen27-Aug-16 16:23 
GeneralRe: Custom Slider control messages cannot be caught Pin
AlbertB27-Aug-16 17:30
MemberAlbertB27-Aug-16 17:30 
GeneralRe: Custom Slider control messages cannot be caught Pin
leon de boer28-Aug-16 22:27
Memberleon de boer28-Aug-16 22:27 
GeneralRe: Custom Slider control messages cannot be caught Pin
AlbertB29-Aug-16 3:17
MemberAlbertB29-Aug-16 3:17 
GeneralRe: Custom Slider control messages cannot be caught Pin
leon de boer29-Aug-16 5:34
Memberleon de boer29-Aug-16 5:34 
AnswerRe: Custom Slider control messages cannot be caught Pin
Stephen Hewitt25-Aug-16 6:33
MemberStephen Hewitt25-Aug-16 6:33 
GeneralRe: Custom Slider control messages cannot be caught Pin
Bram van Kampen27-Aug-16 16:10
MemberBram van Kampen27-Aug-16 16:10 
GeneralRe: Custom Slider control messages cannot be caught Pin
Bram van Kampen27-Aug-16 16:15
MemberBram van Kampen27-Aug-16 16:15 
QuestionCEdit::SetHighlight Pin
AlecJames25-Aug-16 0:48
MemberAlecJames25-Aug-16 0:48 
QuestionRe: CEdit::SetHighlight Pin
Richard MacCutchan25-Aug-16 0:59
mveRichard MacCutchan25-Aug-16 0:59 
AnswerRe: CEdit::SetHighlight Pin
AlecJames25-Aug-16 3:49
MemberAlecJames25-Aug-16 3:49 
AnswerRe: CEdit::SetHighlight Pin
Jochen Arndt25-Aug-16 2:01
professionalJochen Arndt25-Aug-16 2:01 
GeneralRe: CEdit::SetHighlight Pin
Richard MacCutchan25-Aug-16 2:41
mveRichard MacCutchan25-Aug-16 2:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.