WinAPI, Is it worth it?

WinAPI

Hey all,

With all the new and upcoming GUI tool kits, most of them cross platform, is it worth learning the native WinAPI? Well, yes and no. It all depends on what you want to use it for.

The WinAPI is clunky and horrible to use. For example, any of you windows programmers who have working with the API will know that it requires around ~70 lines of code just to run a blank window. Why bother when the same can be done with a few clicks using windows forms, or ~10 lines of code using Qt?

Game Developers.

Game developers do not have much to do with GUI design and implementation, but when they do, they use the Windows API. This is because it that only need to use it for a little bit of the project their working on (DirectX/OpenGL does the rest), it also doesn’t come with the overhead of MFC.

For this sort of purpose, the WinAPI is fine. You only need to use a little bit of it and, it doesn’t come with any overhead (such as MFC). What happens when you want to do serious GUI development in major project. A lot of your time will be spent programming boilerplate GUI code instead of making your product functional. Want a solution? Read on…

Software Developers.

Now, for software developers, there are a wide range of options for implementing a GUI.

The first option is using the Windows API. Using the native API for the complete GUI would be cumbersome. Look at Notepad++. A lot of the code is for the GUI that is implemented in pure WinAPI.

Another option is the most commonly used one. This is using a GUI tool kit. There are some many out that there isn’t enough room here to list them all. The main players are Microsoft Foundation Classes (MFC), Qt, GTK but there are many more. For a complete list visit here.

These tool kits and library’s can save a trem

endous amount of time when developing a GUI. With these you can concentrate on the functionality of your product, not the boilerplate code that used to be needed.

Sally - A C++ IDE

There are also many GUI designers out there. Qt comes with one as does Visual Studio. Also Sally – A Simple C++ IDE which uses the SmartWin library. Visual C# and Visual Basic all come with an integrated GUI designer which uses Windows Forms and WPF.

Conclusion

So, it really boils down to what your needs are. If you are on a deadline then use something like Qt. If you are in it for the learning experience like me then it’s best to go with the Windows API to learn the mechanics of Windows.

Hope this helps!

Harry.

About Harry

I am a 16 year old web designer/developer and I love any form of interactive media.
This entry was posted in C++ and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create