That demo was designed primarily for PB/CC users, who generally don't have a "GUI" to worry about, and putting the "GUI" (the progress bar) in a 'seconday' thread of execution makes sense. ('secondary" here is in the eye of the beholder of course... in a non-multi-threaded PB/CC app, there is no GUI and there are no THREAD CREATE statements)
That said, there is no reason you could not create a progress bar as a child of a status bar control.... just make it's the same size as the GetClientRect() of the status bar (or the status bar part if you are using a partioned status bar - a very cool effect, by the way) and you will be just fine.
i.e in DDT-pseudo-speak..
Code:
CONTROL ADD STATUSBAR hDlg, id, size and stuff to hStatus GetClientRect hStatus, RectVar Convert RectVar to dialog units CONTROL ADD PROGRESSBAR , hStatus, id, (size determined above from RectVar)
MCM
Leave a comment: