64-bit version :
WndProc PROC hWnd:QWORD,uMsg:QWORD,wParam:QWORD,lParam:QWORD PARMAREA=12*QWORD
LOCAL _hWnd:QWORD
.IF uMsg==WM_DESTROY
invoke PostQuitMessage,NULL
.ELSEIF uMsg==WM_CREATE
mov _hWnd,rcx
invoke CreateWindowEx,0,ADDR TBAR_CLASS,0,\
WS_CHILD or WS_VISIBLE or TBS_BOTTOM,\
50,50,200,30,_hWnd,0,hInstance+rip,0
mov hSlider+rip,rax
invoke SendMessage,rax,TBM_SETRANGE,TRUE,\
0 or (100 shl 16)
invoke SendMessage,hSlider+rip,TBM_SETPOS,TRUE,50
.ELSE
invoke DefWindowProc,rcx,rdx,r8,r9
ret
.ENDIF
xor rax,rax
ret
WndProc ENDP