Changing Window's Title Text

BlitzPlus Forums/BlitzPlus Programming/Changing Window's Title Text

SebHoll(Posted 2005) [#1]
Hi,
I am writing an app at the moment that has a progress bar showing the user how far through the calculation the program is. However, a nice feature would be when the window is minimized, the title in the taskbar shows the percentage done of the calculations. E.g. Calcul8 - 36% Complete. I've written the following sample code, but there is a slight flaw in it...

Const countto# =			9999

Global wndMain = 		CreateWindow("Calcul8...",20,20,300,200,0,3)
Global gadProgress = 	CreateProgBar(170,5,120,20,wndMain,0)


Repeat

a#=a#+0.5

If PeekEvent() <> 0 Then
Select WaitEvent()

Case $803:End

End Select
EndIf

b#=a#/countto#

If b# > 1 Then Exit

UpdateProgBar(gadProgress,b)
SetGadgetText(wndMain,"Calcul8... (" + Str$(Int(b*100)) + "%)")

Forever

End


If you have a look at the original window, the "Percentage Complete" increases in the titlebar, however if you minimize the window, the "Percentage Complete" doesn't change in the taskbar... If you restore the window, it carries on updating the value in the titlebar.

What is causing this and how can I get it to change the "Percentage Complete" in the taskbar when the window is minimized... (I think I might have to use Windows API but if someone could give me an example...)

Thanks in Advance

S. Hollington