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 


Stop a game from pausing when not in focus

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
SwaggaJackin'
Master Cheater
Reputation: 2

Joined: 06 Nov 2009
Posts: 304

PostPosted: Wed Jul 10, 2013 6:01 pm    Post subject: Stop a game from pausing when not in focus Reply with quote

I want to stop a game from pausing when it's not in focus. I've checked for calls for GetActiveWindow() and GetForegroundWindow() and removing these calls still causes the game to pause when not in focus.

Dark byte suggested that maybe it's using WM_ACTIVATE or WM_KILLFOCUS. I don't believe WM_ACTIVATE is being used because if I hit the show desktop key the game still pauses when it should technically still have focus...perhaps I'm incorrect.

Either way, my question is how can I check (and catch) if the program is waiting for a WM_ACTIVATE or WM_KILLFOCUS message?

Also, could there be any other 'general' methods the game could be using to detect it's not in focus?

Thanks.
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Wed Jul 10, 2013 8:13 pm    Post subject: Re: Stop a game from pausing when not in focus Reply with quote

SwaggaJackin' wrote:
Either way, my question is how can I check (and catch) if the program is waiting for a WM_ACTIVATE or WM_KILLFOCUS message?
One method in ollydbg is to find all references to DefWindowProc(...), and look among the results for an enormous switch/case. In C you often do:
Code:
LRESULT WindowProc(   HWND hWnd,   UINT Msg,   WPARAM wParam, LPARAM lParam )
{
  switch(Msg)
  {
    case WM_KEYDOWN:
    ...
    break;
    case WM_ACTIVATE: //or whatever messages you need
    ...
    break;
    ...
    default:
    return DefWindowProc(Wnd,  Msg,  wParam,   lParam );
  }
}
If you do olly's analysis, it often displays which case corresponds to which message.
_________________
DO NOT PM me if you want help on making/fixing/using a hack.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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