Help with progress bar

Ok so I made a window and added a progress bar to it then showed the window. Everything worked fine, except when first loading the progress bar it takes like 3 seconds to load. This isn't the painting or anything as it only happens when the form is first showed. Minimizing and then reshowing the window has no effect. Also using a sleep or any kind of delay befor calling showwindow doesn't work either. Can anyone tell me why only this one control is so slow when I start up my app?
Fixed the problem, turns out I added controls after the WM_CREATE message was sent, instead of adding the code to when the message is processed.
Topic archived. No new replies allowed.