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 style GUI?

Author
Message
Zeal
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 17th Jun 2006 06:58
What are my options for creating a windows style gui? I mean of course I want to creeate a menu, popup windows, ect... all ontop of my running sdk program. I had always assumed that VISUAL c++ would be something like VB (in that you would have the ability to drag and drop frames, buttons, ect... that doesnt seem to be the case heh). I did a little search, and it seems like this 'MFC' library is how most people do GUI stuff inside C? But from what I read it doesnt work with SDK yet?

I was getting pretty good with blue gui till I decided to make the jump to C, but now im stuck . Will this new dot.net support help in any way?

Any advice appreciated!

All you need is zeal
Artus
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: France
Posted: 17th Jun 2006 16:56 Edited at: 17th Jun 2006 16:59
Sephnroth made last year a tutorial that should help you : http://forum.thegamecreators.com/?m=forum_view&t=54893&b=22
Briere
19
Years of Service
User Offline
Joined: 28th Feb 2005
Location: Amherst New York, United States
Posted: 17th Jun 2006 18:57 Edited at: 17th Jun 2006 18:58
For a game, the MFC are pointless.
Use the Windows API, it is much better for games.

Current Project: Galaxy Conquest
Working Lines Of Code: 1133
Last Updated: 6/17/06 at 11:55 AM EST
Zeal
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 17th Jun 2006 22:11
Noooooooooooooooooo his links are dead . can anyone repost that?

Im doing a little research on this windows api, might it be a better idea to learn that instead? What exactly did seph make anyway? It seems like learning windows api might be better mainstream experience?

All you need is zeal
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 18th Jun 2006 11:13
Herre is Sephnroth´s tutorial.

Need path finding in your games? Have a look at the tutorials on Pathfinding.

Attachments

Login to view attachments
Zeal
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 19th Jun 2006 03:26
Wow this looks A++! He sure went through a lot of trouble, does it really do half of what the instructions say? Geez...

Although looks like it will take a while to learn. I still wonder if it would be better to learn a more mainstream system, like windows api? Wouldnt that be better 'real world' experience?

How does windows api compare to this?

All you need is zeal
Zeal
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 19th Jun 2006 09:02
Wait, wait... I started reading sephs tut (reading is gud) and it seems like this IS windows api is it not? This tut just shows you how to use windows api with dark sdk (how to get the hwnd pointer ect...). Right?

All I know is im making menus INSIDE the compiler (vs 2003), that seems pretty mainstream to me. So it sounds like this will be worth the effort to learn then eh?

All you need is zeal
EddieB
19
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 19th Jun 2006 11:14
Yes, All of that is WinAPI... and g_pGlob->hWnd is the pointer to the window handle.... You can use most winApi commands with this.
Zeal
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 20th Jun 2006 04:26
Well ive been playing with this all day, wow. What a great tut, I had no idea it would be this easy. However, one thing im really wondering about, is how do you get a image to display in a window.

At the end of the tut (unless I missed something) seph acts like he couldnt figure it out either, and just showed how to do some bitmap workaround (seemed a bit hacky). Is that really the only way to get a dark sdk "image" to show up in a window? Arent there any image panel items, kinda like blue gui?

All you need is zeal
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 22nd Jun 2006 20:26
greetings,

yeah my links will be dead atm as files are being transfered to other servers and the person who owns the one i was using cleaned it out before I was ready for it, heh - thanks for uploading it mir

I have never tried to display an image loaded with darksdk on a winapi dialog, im not sure how you would draw it from memory - its likely to be possiable I have just never tried A *very* hacky way but certainly possiable way is to get darksdk to save the image to a temporary file then load it with GDI, drawing it as my tutorial shows. I'm afraid I dont have time atm to research a way of drawing it to the dialog from memory, im still rebuilding my computer and dont have the sdk installed yet - maybe someone else could try it?

There should indeed be an image box / picture frame component availiable as well - never used one in c++ though so no idea how to use it xD

Glad you found the tutorial usful

imekon
17
Years of Service
User Offline
Joined: 3rd Jul 2006
Location:
Posted: 9th Aug 2006 14:05
Quote: "For a game, the MFC are pointless.
Use the Windows API, it is much better for games."


MFC's advantage (if it has any) is it does make some of the windows GUI things a little bit easier than the plain WIN32 calls.

Unfortunately, VC++ Express doesn't come with MFC.

"Reality Bites"
Charles
19
Years of Service
User Offline
Joined: 11th Jul 2004
Location: Phoenix, AZ USA
Posted: 11th Aug 2006 00:25
MFC makes things very east because most everything is already done for you. Go to the following URL on CodeGuru.com and you will see some simple code that can create "skinnable dialog boxes in MFC":
http://www.codeguru.com/Cpp/W-D/dislog/background/article.php/c5071

Just place your dialogs in an MFC DLL as well as the background bitmap and you have it made.

Login to post a reply

Server time is: 2024-06-17 05:05:14
Your offset time is: 2024-06-17 05:05:14