WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Boxes Examples from Users

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Vertical Thermometer

Keywords: 

;define api stuff

dll=strcat(dirwindows(1),"user32.dll")
func1="CreateWindowExA"
winclass="msctls_progress32"
hwnd=dllhwnd("")
hinst=dllhinst("")


;set progress window options
smooth=1
vertical=4
vis= 268435456
child= 1073741824
PBM_SETRANGE32=1030
PBM_SETSTEP=1028
PBM_STEPIT=1029

;this boxcolor stuff is just cuz I got bored..
BoxOpen("Progress","")
boxcolor(1,"0,255,0",6)
boxtextcolor(1,"255,255,255")
;progress window data
; (you can play around with the numbers get the bar placed anywhere in the window you like.. 
; I have it climbing the lefthand edge of the winbatch window.. 

startx=0
starty=0
width=25
height=125

;create progress window
hprog=dllcall(dll,long:func1,long:0,lpstr:winclass,lpstr:"",long:vertical |smooth | vis | child,long:startx,long:starty,long:width,long:height,long:hwnd, long:0,long:hinst,long:0)

range=100
step=1
;set range and increment numbers (I haven't figured out the 
;whole window size/pixel/step range thing... 
;so, the intcontrol to set the range is left out... leaving the default range at 0 to 100)


;IntControl (22, hprog, PBM_SETRANGE32, 0, RANGE)
;set step (increment) w/ "SendMessage"
IntControl (22,hprog,PBM_SETSTEP,step,0)
for x = 1 to range 
IntControl (22,hprog,PBM_STEPIT,0,0)
timedelay(.05)
boxtext(strcat(@crlf,@crlf,@tab,@tab," now at %x%%%"))
next x 

Article ID:   W14578
Filename:   Vertical Thermometer.txt
File Created: 2001:02:07:14:24:18
Last Updated: 2001:02:07:14:24:18