Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C++] GetPixel of minimized window?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ShurikeN
Advanced Cheater
Reputation: 0

Joined: 09 Jan 2008
Posts: 84

PostPosted: Thu Apr 24, 2008 2:25 am    Post subject: [C++] GetPixel of minimized window? Reply with quote

Hello,

Anyone knows how can i get pixel color of minimized window?

I using the function GetPixel, but it only works if the window´s pixel is visible on the screen.

tnx.

_________________
Code:
XXXXXX      XXXXXX
   XXXXX  XXXXX
     XXXXXXXX
    D I R E C T
     XXXXXXXX
   XXXXX  XXXXX
XXXXXX      XXXXXX
      GameDev
Back to top
View user's profile Send private message
S3NSA
:3
Reputation: 1

Joined: 06 Dec 2006
Posts: 1908
Location: England.

PostPosted: Thu Apr 24, 2008 2:56 am    Post subject: Reply with quote

Sorry to say but to my knowledge I dont think it's possible.

Windows don't handle buffers of the contents of each window. This is why all windows process the WM_PAINT message.

Each window procedure knows how to process the message and render the image they want/need to. If the window is minimized, then there is no way Windows will be able to give you the pixel's color value. In simple terms; GetPixel can only get you what Windows can 'see'.

So I would look for .dll injection as a solution.

However there are people here that know far more than me so I would hang on for someone with more experience before giving up.

_________________
~ You can find me on irc.ccplz.net x
Back to top
View user's profile Send private message Visit poster's website
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Thu Apr 24, 2008 5:25 am    Post subject: Reply with quote

Can you GetDC() a minimized window?
_________________
Back to top
View user's profile Send private message
Trow
Grandmaster Cheater
Reputation: 2

Joined: 17 Aug 2006
Posts: 957

PostPosted: Thu Apr 24, 2008 9:48 am    Post subject: Reply with quote

hmmm

activate that window, move it out of screen, get the pixel color, then minimize it back again.

this shouldnt be in a timer...

_________________
Get kidnapped often.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Thu Apr 24, 2008 5:02 pm    Post subject: Reply with quote

If you are referring to a video game, you can do it with certain rendering systems such as DirectX and OpenGL. Look up how to take a screenshot. Instead of saving the image, store it in a buffer and scan the buffer for the pixel that you need. You will have to do calculations yourself to get the correct pixel you need and such but thats probably the closest you can get to doing this.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites