 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sun Jun 08, 2008 4:04 am Post subject: |
|
|
Ok.
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sun Jun 08, 2008 8:01 am Post subject: |
|
|
hey i added scrollbar for my auto potions and i'd like to know how can i set maximum value minimum value get the value and stuff like that
oh and when i want to scroll it left or right i cant it stucks to the left side of the scrollbar
here's how i created the scrollbar:
| Code: |
hHpScroll = CreateWindowEx(NULL,L"SCROLLBAR",NULL,WS_CHILD | WS_VISIBLE,15,215,136,20,hWnd,(HMENU)IDC_SCROLLBAR_HP,GetModuleHandle(NULL),NULL);
|
btw i tried using msdn but i could understand what they say :X
_________________
Stylo |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sun Jun 08, 2008 8:10 am Post subject: |
|
|
Not quite sure what you mean, give me the msdn stuff and I'll "translate" it for you.
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sun Jun 08, 2008 8:56 am Post subject: |
|
|
thx but how come i cant move it from side to side?
| Code: |
SetScrollRange(hHpScroll,SB_HORZ,1,100,FALSE);
hHpScroll = CreateWindowEx(NULL,L"SCROLLBAR",NULL,WS_CHILD | WS_VISIBLE,15,215,136,20,hWnd,(HMENU)IDC_SCROLLBAR_HP,GetModuleHandle(NULL),NULL);
|
edit: maybe i dont need to create the scrollbar window?
maybe i can use ShowScrollBar function?
_________________
Stylo
Last edited by Stylo on Sun Jun 08, 2008 8:58 am; edited 1 time in total |
|
| Back to top |
|
 |
Renkokuken GO Moderator
Reputation: 4
Joined: 22 Oct 2006 Posts: 3249
|
Posted: Sun Jun 08, 2008 8:57 am Post subject: |
|
|
| 1qaz wrote: |
thx but how come i cant move it from side to side?
| Code: |
SetScrollRange(hHpScroll,SB_HORZ,1,100,FALSE);
hHpScroll = CreateWindowEx(NULL,L"SCROLLBAR",NULL,WS_CHILD | WS_VISIBLE,15,215,136,20,hWnd,(HMENU)IDC_SCROLLBAR_HP,GetModuleHandle(NULL),NULL);
|
| Before you do anything else, I recommend realizing a mistake with that. You do know, you're trying to call SetScrollRange on a handle that is created afterwards, right?
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sun Jun 08, 2008 8:59 am Post subject: |
|
|
| Renkokuken wrote: | | 1qaz wrote: |
thx but how come i cant move it from side to side?
| Code: |
SetScrollRange(hHpScroll,SB_HORZ,1,100,FALSE);
hHpScroll = CreateWindowEx(NULL,L"SCROLLBAR",NULL,WS_CHILD | WS_VISIBLE,15,215,136,20,hWnd,(HMENU)IDC_SCROLLBAR_HP,GetModuleHandle(NULL),NULL);
|
| Before you do anything else, I recommend realizing a mistake with that. You do know, you're trying to call SetScrollRange on a handle that is created afterwards, right? |
is it really matter if it's before or afterwards?
if it is so lets say before
_________________
Stylo |
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Sun Jun 08, 2008 9:02 am Post subject: |
|
|
Yes it does fucking matter... Your sending SetScrollRange to a null handle, it doesn't have a value when your sending the message so it won't do anything -_-
_________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sun Jun 08, 2008 9:02 am Post subject: |
|
|
Yes it is. Because your trying to use it on a NULL handle. You have to call it afterwards like this.
| Code: |
hHpScroll = CreateWindowEx(NULL,L"SCROLLBAR",NULL,WS_CHILD | WS_VISIBLE,15,215,136,20,hWnd,(HMENU)IDC_SCROLLBAR_HP,GetModuleHandle(NULL),NULL);
SetScrollRange(hHpScroll,SB_HORZ,1,100,FALSE);
|
EDIT:
Beaten to it by lurc...
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
Last edited by oib111 on Sun Jun 08, 2008 9:02 am; edited 1 time in total |
|
| Back to top |
|
 |
Renkokuken GO Moderator
Reputation: 4
Joined: 22 Oct 2006 Posts: 3249
|
Posted: Sun Jun 08, 2008 9:02 am Post subject: |
|
|
| 1qaz wrote: | | Renkokuken wrote: | | 1qaz wrote: |
thx but how come i cant move it from side to side?
| Code: |
SetScrollRange(hHpScroll,SB_HORZ,1,100,FALSE);
hHpScroll = CreateWindowEx(NULL,L"SCROLLBAR",NULL,WS_CHILD | WS_VISIBLE,15,215,136,20,hWnd,(HMENU)IDC_SCROLLBAR_HP,GetModuleHandle(NULL),NULL);
|
| Before you do anything else, I recommend realizing a mistake with that. You do know, you're trying to call SetScrollRange on a handle that is created afterwards, right? |
is it really matter if it's before or afterwards?
if it is so lets say before | Of course the handle has the be valid beforehand, otherwise the function will just fail. Passing an invalid parameter, what else would you expect?
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sun Jun 08, 2008 9:06 am Post subject: |
|
|
sry i think i missed it XD
but why cant i move the scrollbar what else do i need to add this?
_________________
Stylo |
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Sun Jun 08, 2008 9:14 am Post subject: |
|
|
Try initializing common controls?
Add this to your headers:
| Code: | #include <commctrl.h>
#pragma comment ( lib, "comctl32.lib" ) |
Then this before you fill ur WNDCLASSEX struct.
| Code: | INITCOMMONCONTROLSEX Init;
Init.dwSize = sizeof(INITCOMMONCONTROLSEX);
Init.dwICC = ICC_STANDARD_CLASSES;
InitCommonControlsEx( &Init ); |
_________________
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
|
| 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
|
|