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.

Dark GDK / Windows Forms and the GDK

Author
Message
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 19th Sep 2010 00:47
Hi all

I've been planning on creating a mission editor for my latest project. This is going to need a 3d view that is controlled by the GDK and also some GUI elements.

I thought the easy way to do this in VS 2008 would be to design the forms necessary for the GUI and then embed the 3D view in that. However, I see from numerous posts on this board that this is not a trivial problem to solve.

I'd rather not pick a difficult problem to solve right now - trying to take my project in baby steps, one at a time. I'd also rather design my GUI in a visual way rather than have to hardcode it. I'm wondering if anyone has any good suggestions as to how I can achieve my goal relatively painlessly?

I'm a bit fan of doing things painlessly. Why reinvent the wheel if there is some wish person out there who has already got a few spare.

Cheers

Philip

Cheer if you like bears! Cheer if you like jam sandwiches!
"I highly recommend Philip" (Philip)
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 19th Sep 2010 00:48
Of course maybe another solution is to create two forms - one can have the GDK's 3d view running in it and the other can have the GUI. But I'm not immediately sure if it is easy for them to interlink. Might have to have a look in my VS 2008 books for an answer to that one!

Cheer if you like bears! Cheer if you like jam sandwiches!
"I highly recommend Philip" (Philip)
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 19th Sep 2010 10:49 Edited at: 19th Sep 2010 10:55
Have you seen my answers in your other thread?

http://forum.thegamecreators.com/?m=forum_view&t=175418&b=22

I can only imagine the following alternatives:

1. You use Windows API to create the user interface. If you want drag-and-drop visual dialog editing, you need to use an external one because Visual Studio Express does not come with a resource editor, but it can compile dialog resources for you if you provide the file. I am using http://www.resedit.net/. However, you need to learn about the Windows API dialog callback functions to make those dialog boxes work.

2. You switch to the .NET version of Dark GDK and then you can use Windows Forms. However, the .NET version is not free and I don't know if it's updated regularly or not. Besides, the .NET framework must be present on the user's machine and that's one more thing to worry about when deploying your application.

(I have even seen on the forum a .NET wrapper for Dark GDK made by Diggsey, who managed to integrate the two by making the whole program a DLL. It doesn't sound convenient at all but might work.)

3. You leave the Windows interface entirely and use something which draws interface elements onto the DirectX surface using either DirectX or Dark GDK drawing commands or sprites. Have a look in the other thread what I recommended there: Dark Forms and MAUI. Although they are not drag-and-drop but should be easy to use and test.

I don't know the scope and needs of your application but if you want the most painless way, I would recommend the third alternative as a start.
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 19th Sep 2010 11:19
Thanks for these helpful thoughts. I've also been reading the other thread.

You're quite right that I don't want to go anywhere near the Windows API. I think I'll probably adopt the DarkForms approach and do everything on the DirectX surface.

Cheer if you like bears! Cheer if you like jam sandwiches!
"I highly recommend Philip" (Philip)
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 21st Sep 2010 21:14
I have a project on the back burner with similar GUI requirements, and I found GDK.Net to be very easy to use. While it's not free, it's pretty inexpensive. I'm not sure how far behind on the update schedule it is, but since they unified the code from DBP and DGDK at least the time between updates should be shorter.

At the moment I think it's caught up with U7.4.

Login to post a reply

Server time is: 2024-11-19 18:36:07
Your offset time is: 2024-11-19 18:36:07