 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Bizarro I post too much
Reputation: 0
Joined: 01 May 2007 Posts: 2648
|
Posted: Tue May 06, 2008 6:06 pm Post subject: [vc++ help] win32 progress bar problems |
|
|
hi
im having trouble setting up win 32 progress control in my dialog. it doesn't show progress bar even though i tried to setstep and stepit
any one know whats wrong?
here is what i did
| Code: |
HWND pHP;
InitCommonControls();
pHP = CreateWindowEx(0, PROGRESS_CLASS, NULL,
WS_CHILD | WS_VISIBLE,
20, 20, 200, 20,
hWnd, NULL, GetModuleHandle(NULL), NULL);
//progress bar init
SendMessage(pHP, PBM_SETBARCOLOR, 0, (LPARAM)RGB(255,0,0));
SendMessage(pHP,PBM_SETRANGE,0,(LPARAM)(0,10));
SendMessage(pHP, PBM_SETSTEP, (WPARAM) 1, 0);
//-----------start-------------------------
SendMessage(pHP, PBM_STEPIT, 5, 0);
|
thank you again
_________________
w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils |
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Tue May 06, 2008 6:21 pm Post subject: |
|
|
try
| Code: | INITCOMMONCONTROLSEX init;
init.dwSize = sizeof(INITCOMMONCONTROLSEX);
init.dwICC = ICC_PROGRESS_CLASS;
InitCommonControlsEx(&init); |
Instead of just InitCommonControls();
Edit:
Btw, you can't use InitCommonControls cuz it doesnt have any affect
Taken from: http://msdn.microsoft.com/en-us/library/bb775695(VS.85).aspx
| Quote: | Remarks
Under Comctl32.dll version 5.x, only Microsoft Windows 95 classes (ICC_WIN95_CLASSES) can be registered through InitCommonControls. Programs which require additional common control classes must use the InitCommonControlsEx function.
Under Comctl32.dll version 6.0 and later, InitCommonControls does nothing. Applications must explicitly register all common controls through InitCommonControlsEx.
|
_________________
|
|
| Back to top |
|
 |
Bizarro I post too much
Reputation: 0
Joined: 01 May 2007 Posts: 2648
|
Posted: Tue May 06, 2008 9:56 pm Post subject: |
|
|
ty lurc
after trying, the progress bar was still not activated(blank rectangle). maybe im missing something important to get the progress bar?
| Code: |
HWND pHP;
INITCOMMONCONTROLSEX init;
init.dwSize = sizeof(INITCOMMONCONTROLSEX);
init.dwICC = ICC_PROGRESS_CLASS;
InitCommonControlsEx(&init);
pHP = CreateWindowEx(0, PROGRESS_CLASS, NULL,
WS_CHILD | WS_VISIBLE,
20, 20, 200, 20,
hWnd, NULL, GetModuleHandle(NULL), NULL);
//progress bar init
SendMessage(pHP, PBM_SETBARCOLOR, 0, (LPARAM)RGB(255,0,0));
SendMessage(pHP,PBM_SETRANGE,0,(LPARAM)(0,10));
SendMessage(pHP, PBM_SETSTEP, (WPARAM) 1, 0);
//-----------start-------------------------
SendMessage(pHP, PBM_STEPIT, 5, 0);
|
_________________
w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils |
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8585 Location: 127.0.0.1
|
Posted: Wed May 07, 2008 12:33 am Post subject: |
|
|
I wrote a quick example showing how to step a progressbar via a thread, attached to this post. Refresh if you can't see it.
_________________
- Retired. |
|
| Back to top |
|
 |
Bizarro I post too much
Reputation: 0
Joined: 01 May 2007 Posts: 2648
|
Posted: Wed May 07, 2008 1:40 pm Post subject: |
|
|
ty so much wiccan
you have always been helpful to me
_________________
w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils |
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8585 Location: 127.0.0.1
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|