Hey where is the code ??
Posted on 2003-05-26 06:07:45 by AceEmbler
If you look at my Res2Dlg AddIn for RadASM I fully implemented scrollbars in that program, it basically involves processing the messages.
Posted on 2003-05-26 08:18:10 by donkey
This stuff is to big for me i do not have time to stray(but thx for good intentions). Dont u have smaller example. ??
Posted on 2003-05-26 08:29:41 by AceEmbler
You have only to check the message handling routine the rest is unrelated :
LOCAL sInfo			:SCROLLINFO

LOCAL pt :POINT
LOCAL lpRECT :RECT

.IF uMsg == WM_INITDIALOG
mov sInfo.cbSize,SIZEOF SCROLLINFO
mov sInfo.fMask,SIF_ALL
mov sInfo.nMin,0
mov sInfo.nPage,277
mov sInfo.nMax,277
mov sInfo.nPos,0
mov sInfo.nTrackPos,0
invoke SetScrollInfo,vScroll,SB_CTL,ADDR sInfo,TRUE
mov sInfo.nPage,517
mov sInfo.nMax,517
invoke SetScrollInfo,hScroll,SB_CTL,ADDR sInfo,TRUE

.ELSEIF uMsg == WM_VSCROLL
mov eax,lParam
invoke memfill,ADDR sInfo,0,SIZEOF SCROLLINFO
mov sInfo.cbSize,SIZEOF SCROLLINFO
mov sInfo.fMask,SIF_ALL
invoke GetScrollInfo,lParam,SB_CTL,ADDR sInfo
mov eax,wParam
.IF ax == SB_BOTTOM
mov eax,sInfo.nMax
mov sInfo.nPos,eax
mov sInfo.nTrackPos,eax

.ELSEIF ax == SB_LINEDOWN
inc sInfo.nPos
inc sInfo.nTrackPos

.ELSEIF ax == SB_LINEUP
dec sInfo.nPos
dec sInfo.nTrackPos

.ELSEIF ax == SB_PAGEDOWN
mov eax,sInfo.nPage
add sInfo.nPos,eax
add sInfo.nTrackPos,eax

.ELSEIF ax == SB_PAGEUP
mov eax,sInfo.nPage
sub sInfo.nPos,eax
sub sInfo.nTrackPos,eax

.ELSEIF ax == SB_THUMBPOSITION
mov eax,sInfo.nTrackPos
mov sInfo.nPos,eax

.ELSEIF ax == SB_THUMBTRACK
mov eax,sInfo.nTrackPos
mov sInfo.nPos,eax

.ELSEIF ax == SB_TOP
mov sInfo.nPos,0
mov sInfo.nTrackPos,0

.endif

mov sInfo.fMask,SIF_POS or SIF_TRACKPOS
invoke SetScrollInfo,lParam,SB_CTL,ADDR sInfo,TRUE

invoke GetWindowRect,hDisplayDialog,ADDR lpRECT
mov eax,lpRECT.left
mov pt.x,eax
mov eax,lpRECT.top
mov pt.y,eax
invoke ScreenToClient,hPrevBox,ADDR pt
mov eax,10
sub eax,sInfo.nPos
invoke SetWindowPos,hDisplayDialog,NULL,pt.x,eax,0,0,SWP_NOSIZE or SWP_NOZORDER

.ELSEIF uMsg == WM_HSCROLL
mov eax,lParam
invoke memfill,ADDR sInfo,0,SIZEOF SCROLLINFO
mov sInfo.cbSize,SIZEOF SCROLLINFO
mov sInfo.fMask,SIF_ALL
invoke GetScrollInfo,lParam,SB_CTL,ADDR sInfo
mov eax,wParam
.IF ax == SB_BOTTOM
mov eax,sInfo.nMax
mov sInfo.nPos,eax
mov sInfo.nTrackPos,eax

.ELSEIF ax == SB_LINEDOWN
inc sInfo.nPos
inc sInfo.nTrackPos

.ELSEIF ax == SB_LINEUP
dec sInfo.nPos
dec sInfo.nTrackPos

.ELSEIF ax == SB_PAGEDOWN
mov eax,sInfo.nPage
add sInfo.nPos,eax
add sInfo.nTrackPos,eax

.ELSEIF ax == SB_PAGEUP
mov eax,sInfo.nPage
sub sInfo.nPos,eax
sub sInfo.nTrackPos,eax

.ELSEIF ax == SB_THUMBPOSITION
mov eax,sInfo.nTrackPos
mov sInfo.nPos,eax

.ELSEIF ax == SB_THUMBTRACK
mov eax,sInfo.nTrackPos
mov sInfo.nPos,eax

.ELSEIF ax == SB_TOP
mov sInfo.nPos,0
mov sInfo.nTrackPos,0

.endif
mov sInfo.fMask,SIF_POS or SIF_TRACKPOS
invoke SetScrollInfo,lParam,SB_CTL,ADDR sInfo,TRUE

invoke GetWindowRect,hDisplayDialog,ADDR lpRECT
mov eax,lpRECT.left
mov pt.x,eax
mov eax,lpRECT.top
mov pt.y,eax
invoke ScreenToClient,hPrevBox,ADDR pt
mov eax,10
sub eax,sInfo.nPos
invoke SetWindowPos,hDisplayDialog,NULL,eax,pt.y,0,0,SWP_NOSIZE or SWP_NOZORDER
Posted on 2003-05-26 09:02:16 by donkey
most important for me is custom look
Posted on 2003-05-26 13:52:04 by AceEmbler