View previous topic :: View next topic |
Author |
Message |
Filipe_Br Master Cheater
Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
Posted: Wed Feb 20, 2019 9:11 am Post subject: Form does not accept childs |
|
|
I'm trying to create a window inside the form but I'm not getting it.
Code: | SetParent((HWND)this->Handle.ToInt32(), FindWindowA(NULL, "UDF1")); |
If instead of UDF1 I use the title of some window created by another program, everything works well.
I remember already doing something similar in some previous version of cheat engine and funciounou.
this-> Handle is the identify of a .NET window
I also tried to create a button in the form of CE using the api of windows and also did not work.
Edit: Being more specific, why does a code like this not work when the window is the CE form?
Code: | #include <Windows.h>
#include <iostream>
int main() {
HWND hwnd = FindWindowA(NULL, "UDF1");
MSG msg;
//if you add WS_CHILD flag,CreateWindow will fail because there is no parent window.
HWND hWnd = CreateWindowA(TEXT("button"), TEXT("Easy"), WS_VISIBLE | WS_CHILD,
10, 10, 80, 25, hwnd, NULL, (HINSTANCE)GetWindowLong(0, GWL_HINSTANCE), NULL);
//ShowWindow(hWnd, SW_SHOW);
//UpdateWindow(hWnd);
std::cout << hwnd;
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return (int)msg.wParam;
} |
Problem solved: To create a child in the CE form, administrator permission is required.
_________________
...
Last edited by Filipe_Br on Wed Feb 20, 2019 3:01 pm; edited 1 time in total |
|
Back to top |
|
 |
OldCheatEngineUser Whateven rank
Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Wed Feb 20, 2019 12:07 pm Post subject: |
|
|
i suggest you read a little bit more about windows programming, you need to register a class, provide the address of window procedure to handle the messages.
and you cant create a button without a main window, you can however create a parent window without minimize, maximize, and close boxes and set your button size to the size of client window.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
 |
Filipe_Br Master Cheater
Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
|
Back to top |
|
 |
OldCheatEngineUser Whateven rank
Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Wed Feb 20, 2019 12:32 pm Post subject: |
|
|
compile that UDF1 form into a standalone executable.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
 |
Filipe_Br Master Cheater
Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
Posted: Wed Feb 20, 2019 12:36 pm Post subject: |
|
|
I think you still do not understand what I'm trying to do.
I'm trying to create a plugin for Cheat Engine, to add the Windows Media Player component.
As you saw in the video I can create a window with Windows Media Player. And I can also make this window be the daughter of other windows of other processes. But for some reason when I try in the Cheat Engine form window it does not work.
Edit: And that script that just creates a button, I already managed to make that button appear in the Cheat Engine form at a time ago. But I no longer have the code I used at the time.
_________________
... |
|
Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Wed Feb 20, 2019 5:59 pm Post subject: |
|
|
use IUP or xavante or LuaTool Kit
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
 |
OldCheatEngineUser Whateven rank
Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Thu Feb 21, 2019 1:22 am Post subject: |
|
|
i did understand, but i cant help you.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
 |
|