Archived

This topic is now archived and is closed to further replies.

progress bar in win32 app.

This topic is 5019 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. Im messing around with win32 application, and i want to make a progress bar to show CPU load, so i put in a progress bar in my dialog, it compiles fine (i just put it in, nothing else) but the program wont start (no errors or anything, just dont start). its really wierd.. here is the progress bar code i wantet to use (just to set start values, havent put in any cpu load things yet). my includes: #include <windows.h> #include <commctrl.h> its in case WM_ONINITDIALOG: hProgress=GetDlgItem(hdwnd, IDC_PROGRESS1); SendMessage(hProgress, PBM_SETRANGE, 1, 100); SendMessage(hProgress, PBM_SETPOS, 0, 1); *NOTE* without any code, it also dont display, if i delete the progress bar, the program starts fine... what can it be ? btw: using visual c++ 6.0 enterprise.

Share this post


Link to post
Share on other sites
Did you call InitCommonControls() or InitCommonControlsEx() at the start of your application? If not, look the function(s) up in the MSDN and add it as the first line of your application.

Toolmaker



-Earth is 98% full. Please delete anybody you can.

Share this post


Link to post
Share on other sites