المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : SendMessage(WM_VSCROLL,SB_LINEDOWN,0) don't work



C++ Programming
11-11-2010, 03:22 AM
I have an MDI application with CView based on CZoomView , based on CScrollView . In CMyView::OnKeyDown(...) I try follow :
void CMyView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
int x = -1;
switch(nChar)
{
case VK_DOWN:
x = SendMessage(WM_VSCROLL,SB_LINEDOWN,(LPARAM)0);
TRACE("\n %d \n",x);
break;
default:
break;
}

CZoomView::OnKeyDown(nChar, nRepCnt, nFlags);
}

the output of TRACE is 0 , but still the window scroll don't work ... why ?

P.S. Of course , thw window have horizontal and vertical scroll .