Register
Handmade Hero»Forums»Code»Windows gui
7 posts

None

Windows gui
4 years, 8 months ago
It is not directly related to game but how to do windows gui programming for simple to medium programs. As far as I researched there is two ways win32 and MFC. Does it worth going with win32 or MFC is fine for gui?

None
Mārtiņš Možeiko
2091 posts / 1 project
Windows gui
4 years, 8 months ago
MFC is just a wrapper over Win32 functions. In my experience it is pretty ugly wrapper. If the program is simple enough - use raw win32 api.

If it something more complex, look into Qt. It is not perfect, but imho it is best of traditional GUI frameworks. As additional bonus your GUI code will be cross-platform.

Another option is to render your GUI manually. Something like ImGui. If you are OK that GUI doesn't look and feel native, that's a reasonable option.
Timothy McCarthy
52 posts
Windows gui
4 years, 8 months ago
I would advocate using just the Win32 API. Use the "Message Crackers" header file ("windowsx.h") and a standard Windows text. If you want a framework to be able to knock out a UI then you will have to invest time learning it. (If you can find Paul DiLascia's Windows++ library on the net that would be worthwhile.)

If you plan to use Visual Studio then you can use the application wizard's to generate a simple application that is based on the Win32 API's. Or you can use
MFC; not the best or the worst, has a long history, and has a IDE.

If you will be using another compiler or want more corss platform support then there are a some of choices. FLTK and Qt are 2 that come to mind. AFAIK, they need more manual text editing and don't have and IDE.

As I say, if you plan to use the Window platform to any serious extent, then learning the Win32 API is the way to go.

- Tim
Mārtiņš Možeiko
2091 posts / 1 project
Windows gui
4 years, 8 months ago
If by IDE you mean drag&drop form designer, then Qt has it. It's called Qt Designer - http://doc.qt.io/qt-5/qtdesigner-manual.html Comes in standard Qt installation (or you can build it from source).
7 posts

None

Windows gui
4 years, 8 months ago
A friend of mine says that windows forms is the standard microsoft pushes.He says that he and his coworkers use it fool time.

None
Mārtiņš Možeiko
2091 posts / 1 project
Windows gui
4 years, 8 months ago
Windows.Forms is part of .NET framework. If you are OK with dependency on .NET and OK to program in .NET language like C# or C++/CLI, then that's also an option.

And Windows.Forms is pretty much deprecated part of .NET framework. It will still work, but all the new .NET UI should use WPF (Windows Presentation Framework) to properly support modern Windows UI elements and features like HiDPI.
Timothy McCarthy
52 posts
Windows gui
4 years, 8 months ago
mmozeiko
If by IDE you mean drag&drop form designer, then Qt has it. It's called Qt Designer - http://doc.qt.io/qt-5/qtdesigner-manual.html Comes in standard Qt installation (or you can build it from source).


That looks like a IDE to me!

- tim