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 startup form

Author
Message
Franky Danneels
16
Years of Service
User Offline
Joined: 3rd May 2008
Location:
Posted: 3rd May 2008 20:02
Hi everybody,

I just managed to make a DarkGDK application that does everything I want it to do

I'd like to make a start up form, where i can choose to change some settings, to start main.cpp,...

So here is my problem, I added another project to my solution file (Windows Form Application), and I want to run the DarkGDK main.cpp file by clicking a button on the 'Windows Forms' form.

What c++ code do i have to put in the click event? Or do i have to do it on another way?


thanks in advance

Franky
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd May 2008 22:35
Actually... you should google starting or spawning another process... I never remember this stuff... in C++ i haven't tried yet.. but in C# you StartNewThread or something - I've done it I just forget...

I'd suspect if you're coding in C++ that you should be able to hook a Win32 API command that literally equates to launching a command shell without the "command intepreter".. literally start process and be able to pass parameters also.

Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 3rd May 2008 23:55 Edited at: 3rd May 2008 23:56
You could have two totally separate builds... The game and the menu... As Jason said have the menu open up and then use a shell command to open the game...

In VB6 all I think you have to do is put that into the event handler... say a click of a button:


~~It's not who you are underneath, but what you do that defines you.~~
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 4th May 2008 02:29
CreateProcess is the normal way. A much simpler (although deprecated) way is WinExec. Both are in the help for MSVC++.

Login to post a reply

Server time is: 2024-11-20 09:18:53
Your offset time is: 2024-11-20 09:18:53