Messages - Codebyte [ switch to compact view ]

Pages: prev1 2 [3] 4 5 6 7 8 ... 29next
11
Developer's Corner / Re: C++ Help
« on: February 12, 2010, 08:53 PM »
nevermind... after doing some research I figured out that gameguard blocks the API calls and filters what is returned... this would make sense as to why its returning 0 for a color call...

12
Developer's Corner / C++ Help
« on: February 12, 2010, 08:30 PM »
Alright so here it goes... I've been experimenting with creating macros based on pixel color changes... I'm not understanding why GetPixel() is returning 0 constantly when I have the target game open... I can see the cursor coordinates, but not the color value... What am I doing wrong? I need to find the color of the pixel underneath the cursor while in a full screen game window.

Here is my example I wrote in a couple minutes to output coordinates and color:

Code: C [Select]
  1. //------------------------------------------------------------------------------
  2. #include <windows.h>
  3. #include <iostream>
  4. //------------------------------------------------------------------------------
  5. using namespace std;
  6. //------------------------------------------------------------------------------
  7. int main(void)
  8. {
  9.         HWND wowHandle = FindWindow(NULL, "World of Warcraft");
  10.         if(!wowHandle)
  11.         {
  12.                 cout << "WoW is not open atm..." << endl;
  13.                 system("pause");
  14.                 return 0;
  15.         }
  16.         else
  17.         {
  18.                 cout << "WoW is OPEN..." << endl;
  19.                 ShowWindow(wowHandle, SW_SHOWNORMAL);
  20.                 SetForegroundWindow(wowHandle);
  21.                
  22.                 while(1)
  23.                 {
  24.                         POINT cursorPoint;
  25.                         GetCursorPos(&cursorPoint);
  26.                         COLORREF color = GetPixel(GetDC(wowHandle), cursorPoint.x, cursorPoint.y);
  27.                         system("cls");
  28.                         cout << "(" << cursorPoint.x << ", " << cursorPoint.y << ")" << endl;
  29.                         cout << "COLOR: " << color;
  30.                 }      
  31.         }
  32.        
  33. }
  34. //------------------------------------------------------------------------------

it's probably sloppy... don't hate on the 5 minute "im at work and in a hurry on my break" coding...

13
wow very nice ham! great work as usual :)

14
Post New Requests Here / Re: Making a tree organization folders
« on: February 28, 2009, 12:03 AM »
Hello Contro :)

I made this program awhile back. Let me know if you want any options added to it... I hope it helps...

http://www.codebyter.com/software/filesorter/

15
N.A.N.Y. 2009 / Re: NANY Developer Interviews
« on: February 19, 2009, 12:12 AM »
Very cool :) Thanks for taking the time to set this up :)

Pages: prev1 2 [3] 4 5 6 7 8 ... 29next
Go to full version