Scrollbar control problems
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
I've made a horizontal scrollbar control using CreateWindowEx, and on the WM_HSCROLL event in the parent window I do this:
if (flag == SB_LEFT) { curPos -= 1; } else if (flag == SB_RIGHT) { curPos += 1; } else if (flag == SB_LINELEFT || flag == SB_PAGELEFT) { curPos -= 1; } else if (flag == SB_LINERIGHT || flag == SB_PAGERIGHT) { curPos += 1; } else if (flag == SB_THUMBTRACK || flag == SB_THUMBPOSITION) { curPos = position; }
Then using SetScrollPos(hWndScroll, SB_CTL, curPos, TRUE) I try to let the scrollbar be updated, but it doesn't seem to work. any ideas? LPCTSTR Dutch = TEXT("Double Dutch :-)");