VOGONS


First post, by vgagame

User metadata
Rank Newbie
Rank
Newbie

I was looking at a book from 1998 by Charles Petzold that covers the Win 32 API and uses the C programming language. He specifically states he is not using object oriented programming and he is not using MFC. I did not know that there could be a book on Windows programming that did not use MFC and C++.

Is the same true about Windows development today? Is there a Windows API that is best understood using C?

As far as I understand, to program for windows today you should know C# 13 and learn .NET 9. Sounds similar to the situation in 1998 where you had to learn C++ and MFC. But to understand windows 9x you would really need to learn C and read about the Windows 32 API. Is this true today? Do you need to use C and the Windows API to understand the API for windows programming? Or is it all object oriented now?

Reply 1 of 2, by hornet1990

User metadata
Rank Newbie
Rank
Newbie

What makes you think you can't still use the win32 API with C today to write a windows application? MFC was essentially an object oriented wrapper around the win32 API. Likewise WinForms was the same in the .Net world, calling win32 via interop.

In the modern world with .Net you can use WinForms, WPF or MAUI to write a Windows app... all three work today even though WinForms is the oldest at 23 years. But you don't have to use .Net by any means...

Of course it depends on what your app is going to be doing too - it is generally a lot easier and more performant to access graphics or GPGPU API's from C/C++ rather than .Net for example. Its all about picking the right language/technology/libraries for the job at hand - .Net can be significantly faster to develop an app in, but there are trade offs in doing so.

The fundamentals haven't changed though - you've still got a window, controls and events to handle - just the how you do that that differs depending on the technology and language chosen.