Jump to content
  • Advertisement
Sign in to follow this  
MadMax1992

Creating Win32 applications

This topic is 3553 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been googleing for quite some time, and I can't find any resource or tutorials, or even some code on how to create Win32 applications (with the buttons/drop-down menu's etc.) while coding in C++. The only resources I can find are in C#, Visual C++ etc. Is it possible for me to code in C++, or is it too much of a pain in the ass and would I be better of using a GUI Library (I would prefer not to, but if I have to, are there any good ones out there?) P.S. I have created basic Win32 applications, I know how messaging works. I've also worked with the GDI (and created a simple GUI system in GDI), but I want to use the windows-controls. Thanks in advance, Max Henger

Share this post


Link to post
Share on other sites
Advertisement
You can code Win32 applications in C++. It can be a pain in the ass, and your best bet would be having a copy of the bible for Windows programming. There are some decent free resources on the Internet. Once you've got the content from that tutorial under control, all you should really need to expand your knowledge is the MSDN and Google.

Honestly, it is probably not worth the effort of creating a complicated Win32 application in C++ and you would likely be better off using WinForms/WPF and C#. If you know you need to do it in C++, then you should buy the book I mentioned or learn to use MFC (ick) or WTL.

Edit: Of course, you can't really effectively use MFC or WTL unless you understand the Windows API so you're going to have to learn it either way. Hence this being more work than it is worth. Do yourself a favor and just use a newer technology unless you are ABSOLUTELY SURE you need to do this in C++.

Share this post


Link to post
Share on other sites
Quote:
Original post by MadMax1992
The only resources I can find are in C#, Visual C++ etc.

Visual C++ is a tool, not a language. Specifically, Visual C++ is the name of the IDE for C++ that Microsoft currently publishes. It is a part of Visual Studio. Any resources for Visual C++ are resources for C++.

Win32 GUI programming in C++ is not the most pleasant of experiences, but it's quite doable. If you use and write smart abstractions, it can even be quite elegant. Look into WTL, an open source library released by Microsoft that provides elegant C++ access to Win32 GUI and system constructs.

Share this post


Link to post
Share on other sites
If you're using C++, I recommend wxWidgets. Free and with a sufficiently liberal license to allow for proprietary development.

While not quite as nice as going straight C#, it's worth it to me to avoid maintaining a tedious glue layer between managed and native code. However, if your points-of-contact between managed and native code are few, that could potentially be a better approach (i.e., C++ engine, Managed C++ glue to expose necessary functionality, C# Gui).

Unless your GUI requirements are pretty minimal, or want to spend the next year writing your own GUI library, I would just about never recommend using the native Win32/C functionality for creating your GUI elements.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!