Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / AGK.Net in a WinForm / Panel

Author
Message
slewrate
12
Years of Service
User Offline
Joined: 13th Oct 2011
Location: Austin, Texas
Posted: 4th May 2012 19:30
Hello, I was wondering what it would take to render the output of AGK.Net into a panel ?
Would it be possible to change HWND (g_Hwnd) to the reference of a WinForm control and render it on that ?
I wanted to attempt that but I am unable to even reference the agk wrapper in C# after I compiled it on my own.
slewrate
12
Years of Service
User Offline
Joined: 13th Oct 2011
Location: Austin, Texas
Posted: 4th May 2012 21:36
I have played around with this for a while.
It looks like I am able to display text in a WinForm panel, however, I must be doing something (or lots of things) terribly wrong because there is an initial empty windows displayed which comes from this call in WindowsCore.h:
HWND hWnd = CreateWin32Window((HINSTANCE)hInstance.ToPointer(), DeviceWidth, DeviceHeight, szTitle, DevicePositionX, DevicePositionY, Fullscreen );

Once I close this window, it will actually display the winform.
I honestly have not enough knowledge about Win32 programming and how AppGameKit works on a lower level.

Maybe someone out there is trying to accomplish the same and has an idea how to make this usable. I have uploaded the project file(s).

Thanks
Jens

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-05-03 12:08:25
Your offset time is: 2024-05-03 12:08:25