| View previous topic :: View next topic |
| Author |
Message |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Sat Oct 25, 2008 9:01 am Post subject: How would I use getpixel in fullscreen maple? |
|
|
So How would I do it?
If I use Bypassed GetPixel() in window mode it works but in full screen it dsoesn't... |
|
| Back to top |
|
 |
TraxMate Master Cheater
Reputation: 0
Joined: 01 Mar 2008 Posts: 363
|
Posted: Sat Oct 25, 2008 9:09 am Post subject: |
|
|
I wondering the same thing. But I havn't got it to work in windowed mdoe yet. Could you tell how you did?  |
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Sat Oct 25, 2008 9:11 am Post subject: |
|
|
| Trampoline over the 5-Bytes that GG Patches with a jump. |
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sat Oct 25, 2008 9:14 am Post subject: |
|
|
oh lawl my bad
I think it's because in full screen it stretches an 800x600 image to fit a full moniter. You might have to adjust how you use the function. So say i have a red pixel at 600,18 Would you have to adjust to the screen size or can you use 600,18? _________________
Last edited by HomerSexual on Sat Oct 25, 2008 9:32 am; edited 1 time in total |
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Sat Oct 25, 2008 9:15 am Post subject: |
|
|
| hmm.. But Im getting the pixel at my mouse. so My mouse would be in the 800 by 600 range. |
|
| Back to top |
|
 |
TraxMate Master Cheater
Reputation: 0
Joined: 01 Mar 2008 Posts: 363
|
Posted: Sat Oct 25, 2008 9:41 am Post subject: |
|
|
| dnsi0 wrote: | | Trampoline over the 5-Bytes that GG Patches with a jump. | I know how to bypass GetPixel but not how to use it.
| dnsi0 wrote: | | hmm.. But Im getting the pixel at my mouse. so My mouse would be in the 800 by 600 range. | Are you getting the pixel while in fullscreen? |
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Sat Oct 25, 2008 9:55 am Post subject: |
|
|
| Quote: | | I think it's because in full screen it stretches an 800x600 image to fit a full moniter. You might have to adjust how you use the function. So say i have a red pixel at 600,18 Would you have to adjust to the screen size or can you use 600,18? |
GetPixel requires a handle to the window, so all the co-ordiantes are relative to the window
i dont know why it wont work fullscreen, but if you dont post the source i doubt anyone can help
im failry sure my way, which i use in snootae bot worked in full screen
Edit: ooh, also, are you getting the pixel at the exact mouse x and y positions? i might have a solution _________________
|
|
| Back to top |
|
 |
--Pillboi-- Grandmaster Cheater Supreme
Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Sat Oct 25, 2008 11:39 am Post subject: |
|
|
| Snootae wrote: | | ooh, also, are you getting the pixel at the exact mouse x and y positions? i might have a solution |
You mean move the mouse?
A better question would be, what value does it return in full screen?
Always the same colour? A wrong RGB value? CLR_INVALID? _________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair. |
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Sat Oct 25, 2008 11:44 am Post subject: |
|
|
i was gonna say if it keeps update the pixel at the position of the mouse, it wont work because the 0,0 pixel is actually part of the mouse image's black outline
and yeh, your questions are most generally helpful, but i dont much care for helping really _________________
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Sat Oct 25, 2008 12:29 pm Post subject: |
|
|
Thanks Ill try that. And how to use???
Full screen: GetPixel(GetDC(0),x,y)
Screen: GetPixel(GetDC(yourfckinghwnd),x,y)
there ya go. |
|
| Back to top |
|
 |
TraxMate Master Cheater
Reputation: 0
Joined: 01 Mar 2008 Posts: 363
|
Posted: Sat Oct 25, 2008 1:16 pm Post subject: |
|
|
Does anyone know what's wrong with this code? | Code: | void Test(int x, int y, int r, int g, int b)
{
BYTE R = GetRValue(r), G = GetGValue(g), B = GetBValue(b);
char Message [50];
if(GetPixel(GetDC(NULL), x, y) == (R | G | B))
{
sprintf_s(Message, "RGB you choosed : %d, %d, %d", R, G, B);
MessageBoxA(NULL, Message, "Message", MB_OK);
}
else
cout << "Error" << endl;
} | When I call the function it works sometimes and sometimes not :S.
I post it here cuz I think it's not necessary to make a new topic about getpixel.. |
|
| Back to top |
|
 |
--Pillboi-- Grandmaster Cheater Supreme
Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Sat Oct 25, 2008 1:27 pm Post subject: |
|
|
I don't know if this is the only problem, but for GetRValue, GetGValue and GetBValue, they require the full rgb colour. However, seeing as you've already been supplied with the rgb values, I don't know why you're trying to retrieve them.
On top of that, you can just compare the COLOUR structures without separating them into parts.
Also, I can't explain why, but I don't think your if statement will work...  _________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair. |
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sat Oct 25, 2008 1:52 pm Post subject: |
|
|
| TraxMate wrote: | Does anyone know what's wrong with this code? | Code: | void Test(int x, int y, int r, int g, int b)
{
BYTE R = GetRValue(r), G = GetGValue(g), B = GetBValue(b);
char Message [50];
if(GetPixel(GetDC(NULL), x, y) == (R | G | B))
{
sprintf_s(Message, "RGB you choosed : %d, %d, %d", R, G, B);
MessageBoxA(NULL, Message, "Message", MB_OK);
}
else
cout << "Error" << endl;
} | When I call the function it works sometimes and sometimes not :S.
I post it here cuz I think it's not necessary to make a new topic about getpixel.. |
according to this the only time your if will hold true is if x,y is in the exact same point with the exact same color every time _________________
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Sat Oct 25, 2008 1:59 pm Post subject: |
|
|
| Yea it does work. Its getting maple's pointer's black line. Lol... |
|
| Back to top |
|
 |
--Pillboi-- Grandmaster Cheater Supreme
Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Sat Oct 25, 2008 2:01 pm Post subject: |
|
|
Glad it works.  _________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair. |
|
| Back to top |
|
 |
|