Link to home
Start Free TrialLog in
Avatar of wrobel
wrobel

asked on

CScrollBar Messages

I am trying to process a on LBUTTONUP message for a scroll bar. But it doesn't seem to be getting one. I can see from the spy tool that one is being sent, but my scroll bar class is not picking it up. Can anyone tell me where this message is going and how to process it?
Avatar of captainkirk
captainkirk

Try deriving your own scroll bar class and overriding PreTranslateMessage() to catch it there.
Hi wrobel,

U can add to dialog function:
void CTESTDlg::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
  if (nSBCode == SB_ENDSCROLL) {
    //This message such as WM_LBUTTONUP
    //Add your code here...
  }

  CDialog::OnVScroll(nSBCode, nPos, pScrollBar);
}

Or U can use captainkirk, method

Hope that helps,
  mahno
Avatar of wrobel

ASKER

I'm sure what you were trying to tell me. I need to find out if the left mouse button is up or not. I did what captainkirk said but the message doesn't even get there. It seem to be lost when my program runs through some RTL2( a really old language) code, which is called in my scroll down code.
ASKER CERTIFIED SOLUTION
Avatar of Zoppo
Zoppo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wrobel

ASKER

Adjusted points from 50 to 100
Avatar of wrobel

ASKER

Excellent that worked a treat, thank you very much for you answer.
I'm glad I could help you,

have a nice day,

ZOPPO