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 


[Help]Get the DC/Canvas of a Minimized Window?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
MiLkz
Newbie cheater
Reputation: 0

Joined: 22 Feb 2009
Posts: 20

PostPosted: Sat Mar 07, 2009 8:00 pm    Post subject: [Help]Get the DC/Canvas of a Minimized Window? Reply with quote

Once a program is minimized the canvas does not repaint itself..and i dont believe you can force it to repaint(if im wrong tell me how).

BUT..in vista if you minimize a program and then hover over it on the task bar, you can view it, so in vista it does repaint itself, the problem is getting the hook to accomplish that.. if you know how ill give you a big cookie Very Happy

Im working with delphi, and i am making a program that i would like to be minimized. I found with the function PrintWindow i can have other programs cover it, but no luck yet when its minimized

all your help is appreciated
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Sat Mar 07, 2009 8:25 pm    Post subject: Reply with quote

Call RedrawWindow().
_________________
Back to top
View user's profile Send private message
MiLkz
Newbie cheater
Reputation: 0

Joined: 22 Feb 2009
Posts: 20

PostPosted: Sat Mar 07, 2009 9:17 pm    Post subject: Reply with quote

sponge wrote:
Call RedrawWindow().


doesnt work, have u actually used this function to get an updated DC from a minimized program?

the program im trying to get is a flash game in a Twebbrowser
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sat Mar 07, 2009 10:10 pm    Post subject: Reply with quote

sponge wrote:
Call RedrawWindow().


to me it appears this function will only update a window that is in focus or on the screen. When windows are minimized their content is wiped and is only viewable (by normal methods) when the window is not minimized.

_________________
Back to top
View user's profile Send private message
MiLkz
Newbie cheater
Reputation: 0

Joined: 22 Feb 2009
Posts: 20

PostPosted: Sat Mar 07, 2009 10:17 pm    Post subject: Reply with quote

Quote:
to me it appears this function will only update a window that is in focus or on the screen. When windows are minimized their content is wiped and is only viewable (by normal methods) when the window is not minimized.


so far im thinking it is impossible(in any programming language)...only possible solution i see is finding the hook vista uses(see first post)

it can be done in a java application, by getting it direct from the java program but thats a diff story Very Happy

if somone figures it out ill bake them a big cake
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sat Mar 07, 2009 11:01 pm    Post subject: Reply with quote

MiLkz wrote:
Quote:
to me it appears this function will only update a window that is in focus or on the screen. When windows are minimized their content is wiped and is only viewable (by normal methods) when the window is not minimized.


so far im thinking it is impossible(in any programming language)...only possible solution i see is finding the hook vista uses(see first post)

it can be done in a java application, by getting it direct from the java program but thats a diff story Very Happy

if somone figures it out ill bake them a big cake


I've heard its impossible -from people in irc- but i know it is possible because dock tools that i have (to make my xp like vista) have the preview docker.

I'm also very curious at how it can be done.

_________________
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Sun Mar 08, 2009 2:17 am    Post subject: Reply with quote

Try RDW_INTERNALPAINT as a parameter, or fake an update region. Don't really know if it will work, just reading the remarks on MSDN.

Otherwise, hook the target process. On WM_MINIMIZE, just move the window offscreen.

_________________
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Sun Mar 08, 2009 7:42 am    Post subject: Reply with quote

PrintWindow();
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Sun Mar 08, 2009 9:21 am    Post subject: Reply with quote

I dont really get what ur trying to do??!
_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
MiLkz
Newbie cheater
Reputation: 0

Joined: 22 Feb 2009
Posts: 20

PostPosted: Sun Mar 08, 2009 9:42 am    Post subject: Reply with quote

@sponge
RedrawWindow does not work with any parameters

@tombana
If you would have read my first post Very Happy...you would see that i am using PrintWindow, but it doesnt work if the window is minimized...but it will work if the window is covered by another window

@Naablet
I dont know how else to explain it..I am trying to get the "updated DC" of a minimized window.(once you minimize a window, the DC no longer updates until you maximize it)..like if i wanted to GetPixel(100, 100), i wouldnt be able to while it was minimized..
Back to top
View user's profile Send private message
iNoobHacker
Advanced Cheater
Reputation: 0

Joined: 05 Nov 2006
Posts: 99

PostPosted: Sun Mar 08, 2009 9:58 am    Post subject: Reply with quote

Some sort of minimized pixel bot? wouldn't it be easier to just read the memory?
_________________
"Two things are infinite: the universe and human stupidity, but I'm still not sure about the first one."
Back to top
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Sun Mar 08, 2009 10:06 am    Post subject: Reply with quote

You can't do it with Win32 APIs. If you noticed, Vista's window preview stops updating the window once it's minimized. You'll still see a preview, but it will be from before the window was minimized.
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sun Mar 08, 2009 10:43 am    Post subject: Reply with quote

rapion124 wrote:
You can't do it with Win32 APIs. If you noticed, Vista's window preview stops updating the window once it's minimized. You'll still see a preview, but it will be from before the window was minimized.


I never knew that. I tested with VisualToolTIp and you're right. It won't display a DC until the window has been maximized, then it gives the last instance of the program.

_________________
Back to top
View user's profile Send private message
Overload
Master Cheater
Reputation: 0

Joined: 08 Feb 2008
Posts: 293

PostPosted: Sun Mar 08, 2009 5:48 pm    Post subject: Reply with quote

So then it's almost like taking a screen shot when the window is minimized, then displaying it when the mouse hovers over it in the task bar. I know that's a really terrible method, but I don't know how else you would do it.
_________________
Blog

Quote:
Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that
Back to top
View user's profile Send private message MSN Messenger
BanMe
Master Cheater
Reputation: 0

Joined: 29 Nov 2005
Posts: 375
Location: Farmington NH, USA

PostPosted: Sun Mar 08, 2009 6:15 pm    Post subject: Reply with quote

couldnt you grab the window Handle..create your own window and use SetParent() ...
Back to top
View user's profile Send private message MSN Messenger
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