Using GUI in a DLL

04/30/2017 00:35 martinx1#1
Hi, I have coded a simple hack for Metin2 but now i want to add some simple GUI.

The problem is that i don't know how to implement a GUI in a DLL, i can easily make a GUI in a .exe but i can't implement it on a DLL. I have tried to use CLR support on my main hack but the DLL won't inject and i don't know why.

I have never work with graphical interfaces before.

Any tips or sugestions?
04/30/2017 03:13 _asm#2
>2017 and still doing hacks for metin2
back to topic:
well, since your hack is simple I'd suggest you using the win32 api and code the message loop and events by hand without any toolkit.
this approach is much more lightweight than using Qt or other various frameworks.
I also recommend you to look into wxWidgets. It's extremely lightweight and has a well written documentation and useful libraries.

the only thing left to do is to create a separate thread for the window. this is required since you're directly injecting into the game's mainthread which would block your window from appearing.
simply use [Only registered and activated users can see links. Click Here To Register...] or other implementations such as std::thread, CreateThread, wxThread (if you're using wxWidgets) etc.
04/30/2017 13:19 maxi39#3
you can use sfml too.
[Only registered and activated users can see links. Click Here To Register...]
for example:

04/30/2017 19:34 martinx1#4
Quote:
Originally Posted by _asm View Post
>2017 and still doing hacks for metin2
I'm still a newbie in the area. I Just want to learning more and this is a simple game with leaked source and with almost no protection.
Quote:
Originally Posted by _asm View Post
>
well, since your hack is simple I'd suggest you using the win32 api and code the message loop and events by hand without any toolkit.
this approach is much more lightweight than using Qt or other various frameworks.
I also recommend you to look into wxWidgets. It's extremely lightweight and has a well written documentation and useful libraries.

the only thing left to do is to create a separate thread for the window. this is required since you're directly injecting into the game's mainthread which would block your window from appearing.
simply use [Only registered and activated users can see links. Click Here To Register...] or other implementations such as std::thread, CreateThread, wxThread (if you're using wxWidgets) etc.
Thanks for the sugestions, i will take a look ate those and decide wich use.

Quote:
Originally Posted by maxi39 View Post
you can use sfml too.
[Only registered and activated users can see links. Click Here To Register...]
for example:

That looks a simple and easy to use i will probably go for that one
Thank You
04/30/2017 22:36 maxi39#5
Quote:
Originally Posted by martinx1 View Post
That looks a simple and easy to use i will probably go for that one
Thank You
if u only use the framework, u have to code the gui elements by ur self. maybe u will get new experiences :).
05/01/2017 01:37 atom0s#6
How in depth of a UI are you trying to do? And is this attempting to be external or internal in the game itself?
05/01/2017 02:35 _asm#7
Quote:
Originally Posted by atom0s View Post
How in depth of a UI are you trying to do? And is this attempting to be external or internal in the game itself?
Internal. He is trying to attach a DLL with a GUI. I guess this thread can be closed since there are enough answers with possible solutions to his problem.

with kind regards,
_asm
05/01/2017 16:31 martinx1#8
Thanks to all the sugestions, i will take a look in some of them in a near future, as my free time now is not much and, as _asm said, the thread can be closed
07/11/2017 04:10 Cøre#9
Use Qt Visual Studio Addin.
07/12/2017 23:37 _asm#10
Quote:
Originally Posted by Cøre View Post
Use Qt Visual Studio Addin.
too much of an overhead