What is the notification code that gets sent when a scrollbar event occurs?
-
Hi, I'm using the OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) method to find out when a user uses a scrollbar. Except I'm not sure what to be checking lParam against. I've casted lParam to be a NMHDR*, but when I check the value of pNMHDR->code, it's usually 0xFFFFFFF4. Can anyone tell me what xxxxx should be in the following line?
BOOL CBaseFormView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) { NMHDR* pNMHDR = (NMHDR*)lParam; **if(pNMHDR->code == xxxxx)** { //Do stuff } }
Or can someone tell me if I'm going about this the wrong way? Thanks, skyapie -
Hi, I'm using the OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) method to find out when a user uses a scrollbar. Except I'm not sure what to be checking lParam against. I've casted lParam to be a NMHDR*, but when I check the value of pNMHDR->code, it's usually 0xFFFFFFF4. Can anyone tell me what xxxxx should be in the following line?
BOOL CBaseFormView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) { NMHDR* pNMHDR = (NMHDR*)lParam; **if(pNMHDR->code == xxxxx)** { //Do stuff } }
Or can someone tell me if I'm going about this the wrong way? Thanks, skyapie -
Hi, I'm using the OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) method to find out when a user uses a scrollbar. Except I'm not sure what to be checking lParam against. I've casted lParam to be a NMHDR*, but when I check the value of pNMHDR->code, it's usually 0xFFFFFFF4. Can anyone tell me what xxxxx should be in the following line?
BOOL CBaseFormView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) { NMHDR* pNMHDR = (NMHDR*)lParam; **if(pNMHDR->code == xxxxx)** { //Do stuff } }
Or can someone tell me if I'm going about this the wrong way? Thanks, skyapieskyapie wrote:
I'm using the OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) method to find out when a user uses a scrollbar
If this scrollbar is of this view only then it will not send WM_NOTIFY message. Handle WM_VSCROLL message
skyapie wrote:
BOOL CBaseFormView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) { NMHDR* pNMHDR = (NMHDR*)lParam; if(pNMHDR->code == xxxxx) { //Do stuff } }
This code will work , if you want to handle scrolling of child window of this view, lets say scrolling in listcontrol present as child of this view.
Prasad Notifier using ATL | Operator new[],delete[][^]
-
You will get control at OnVScroll() OnHScroll() when the suer scrolls the scrol bar Rinu Raj