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 


Dialog Box/Menuitems

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
The0neThe0nly
Expert Cheater
Reputation: 0

Joined: 08 Dec 2009
Posts: 119
Location: In a box

PostPosted: Thu Sep 22, 2011 2:40 pm    Post subject: Dialog Box/Menuitems Reply with quote

Hi, I'm trying to figure out a way to open a dialog box in the process I am trying to cheat on.

Inside the Dialog Box, I want to create some buttons that have the same IDs as some of the menuitems in the process. So, when I click on the 'Explorer' button in my dialog box, Explorer will show in my process.

I already know the menuitem IDs, but how do I create the dialog box?

Hitler, please help me!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25860
Location: The netherlands

PostPosted: Thu Sep 22, 2011 2:54 pm    Post subject: Reply with quote

Define "same IDs as some of the menuitems in the process"
A process can have multiple windows and each window can have the same ID's for menu items as another window yet be completely unrelated


anyhow, what specifically do you want to do?
Show a dialogbox when you click an existing menuitem in the process?
Show a dialogbox unrelated to the rest of the game
Add a menu item to an existing window ?
Add a button to the gui of an existing window ?

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
The0neThe0nly
Expert Cheater
Reputation: 0

Joined: 08 Dec 2009
Posts: 119
Location: In a box

PostPosted: Thu Sep 22, 2011 3:28 pm    Post subject: Reply with quote

It would be nice if I could add a menuitem to the window.. Razz

I found the IDs of some of the menuitems in the program when I opened it with ResHack. I even edited one of the dialog boxes with ResHack, and added some buttons that have the same IDs as the menuitems. When I opened a game with the program, I was able to open the dialog box by pressing the screenshot button. The buttons I had added earlier with ResHack inside of the screenshot dialog box worked! The only problem, is that before I join a game, the game doesn't load because it checks to see if the resources have been edited. I'm trying to edit (or create) a dialog box while the program is running, after the check that looks to see if the resources have been modified.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25860
Location: The netherlands

PostPosted: Thu Sep 22, 2011 4:20 pm    Post subject: Reply with quote

I have no experience with resources, but try a dll injection. In the dll use setWindowLong to override the wndproc so you get full control over the message handler

Then find and modify the menu (or just replace it with the same id's) and when it's the ID you want handle it accordingly.
Also, you might be able to use resource specific functions once you have the wndproc, but I have no clue

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
The0neThe0nly
Expert Cheater
Reputation: 0

Joined: 08 Dec 2009
Posts: 119
Location: In a box

PostPosted: Thu Sep 22, 2011 4:58 pm    Post subject: Reply with quote

Dark Byte wrote:
I have no experience with resources, but try a dll injection. In the dll use setWindowLong to override the wndproc so you get full control over the message handler

Then find and modify the menu (or just replace it with the same id's) and when it's the ID you want handle it accordingly.
Also, you might be able to use resource specific functions once you have the wndproc, but I have no clue


I'm not an expert in C++
But I would put
Code:
LONG_PTR WINAPI SetWindowLongPtr(
  __in  HWND hWnd,
  __in  int nIndex,
  __in  LONG_PTR dwNewLong
);


Is this correct? I am very confused Sad

And I'm not completely sure what I would do after.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25860
Location: The netherlands

PostPosted: Thu Sep 22, 2011 5:04 pm    Post subject: Reply with quote

first originalfunc=GetWindowLongPtr(handle, GWLP_WNDPROC) to get the original wndproc
Then SetWindowLongPtr(handle, GWLP_WNDPROC, (LONG_PTR)newwndproc))

and in newwndproc handle message and do stuff and when you're done do a CallWindowProc(originalfunc, handle, msg, wparam, lparam)


(I notice there is a DWLP_DLGPROC as well, if you're more confortable with that, look into it)

But yeah, you'll need to know how to do GUI in C first

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
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 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