Is it possible to make a modern looking UI with Win32 and C++?

Robert N 0 Reputation points
2023-11-18T22:49:03.9766667+00:00

Hi,

I'm new to Windows development, reading the docs and getting lost. My goal is to port a drawing and painting app that I made on macOS. I will use unmanaged C++ and low level graphics APIs like Direct3D/2D. On the Mac I did the same with Metal, and it's essential to this app. But I also need more standard UI around the edges, like buttons, fields, toolbars, menus, lists, sliders, etc. I also have some custom-rendered widgets like custom color picker wheels.

I see there is an older C style API called "Win32". I'm fine using an API like this, even if it requires more work initially. Eventually I'd wrap it in my own C++ convenience classes. But what I'm wondering about is whether it's merely an older C style API, or if it also results in an older looking UI for the user. As Windows evolves version to version, are new controls and styles made available so they can be used through this Win32 API? Or is there a different API that I should use.

thanks,

Rob

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
783 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 85,126 Reputation points
    2023-11-19T10:06:34.3066667+00:00

    The last MS framework for modern UI is WinUI 3

    It can be used in C++/WinRT or C# (simpler syntax in C#)

    Since 1.4 version, XAML Islands can also be used (DesktopWindowXamlSource) to host XAML controls inside classic Win32 apps (C++/Win32, WinForms, WPF)

    (official MS sample : https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/Islands

    or a test sample I had uploaded with WPF : https://github.com/castorix/WPF_XAML_Islands_WinUI3

    to test some XAML controls)

    You can check main XAML controls with WinUI 3 Gallery,

    from store https://apps.microsoft.com/detail/winui-3-gallery/9P3JFPWWDZRC?hl=en-US&gl=US

    or from source https://github.com/microsoft/WinUI-Gallery

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.