Is Win32 API sufficient to make a user interface like the latest Visual Studio

Started by
28 comments, last by ChaosEngine 10 years, 7 months ago

No you can't create anything like this with native Win32 API.

Visual Studio uses WPF, which is very cool for interfaces, but it is managed technology, thus can be accessed only via C#, C++/CLI. WPF uses hardware acceleration by utilizing DirectX, thus it is very fast if you omit the drawbacks of its internal rendering algorithms. It is excellent if you want to create an applications with complex and highly customizable UI. You can even embed DirectX content into WPF form, which is the very fast and cheap way of creating cool-looking UI. Tho it will be a bit complex, but definitely possible. As of QT, well, it is nice and cross-platform technology, tho if you want to see it in action, just look at the EA Origin desktop client - it is horrible and very laggy.

You can create any ui with the Win32 API.

You can hack DirectX in any ui library/framework, so thats not a plus. WPF is friendly in use, especially when someone with XAML knowledge has to create the ui and another writes the code behind it.

Please show me the way to make VS2012 UI by means of pure Win32 API.

Advertisement


Please show me the way to make VS2012 UI by means of pure Win32 API

What they mean is that you could theoretically reimplement a UI framework that looks and behaves exactly like WPF using only Win32 API. (as you could using for example opengl, or any other rendering api. With win32 you would even get some things "for free", like mouse/keyboard, event and a window concept).

It would not be practical though, specially the behaves part would take too much time to get right, except for very limited use cases.

Also, even then, it would probably need an expert in UI frameworks to not just make a huge mess of it all.

As of QT, well, it is nice and cross-platform technology, tho if you want to see it in action, just look at the EA Origin desktop client - it is horrible and very laggy.

You shouldn't judge a framework like Qt by looking at one bad example. Qt has been successfully used in a lot of different software. Autodesk Maya interface use Qt for example. I have worked with both win32 and Qt and Qt is much better in my opinion..

The Cre

No you can't create anything like this with native Win32 API.

Visual Studio uses WPF, which is very cool for interfaces, but it is managed technology, thus can be accessed only via C#, C++/CLI. WPF uses hardware acceleration by utilizing DirectX, thus it is very fast if you omit the drawbacks of its internal rendering algorithms. It is excellent if you want to create an applications with complex and highly customizable UI. You can even embed DirectX content into WPF form, which is the very fast and cheap way of creating cool-looking UI. Tho it will be a bit complex, but definitely possible. As of QT, well, it is nice and cross-platform technology, tho if you want to see it in action, just look at the EA Origin desktop client - it is horrible and very laggy.

You can create any ui with the Win32 API.

You can hack DirectX in any ui library/framework, so thats not a plus. WPF is friendly in use, especially when someone with XAML knowledge has to create the ui and another writes the code behind it.

Please show me the way to make VS2012 UI by means of pure Win32 API.

With the CreateWindowEx and these style flags will allow you to create buttons on a window, MFC does the same thing and it is the same pain in creating these.

ateWindowEx function allows you to create all kinds of UI elements, but it is the same pain as using MFC with those.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion


Visual studio did a lot of effort to optimize WPF and so the WPF that visual studio uses is NOT the WPF available to you in .Net.

Huh, I never knew that. Do you have any more info on that? What exactly did they do?

if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

No you can't create anything like this with native Win32 API.

Visual Studio uses WPF, which is very cool for interfaces, but it is managed technology, thus can be accessed only via C#, C++/CLI. WPF uses hardware acceleration by utilizing DirectX, thus it is very fast if you omit the drawbacks of its internal rendering algorithms. It is excellent if you want to create an applications with complex and highly customizable UI. You can even embed DirectX content into WPF form, which is the very fast and cheap way of creating cool-looking UI. Tho it will be a bit complex, but definitely possible. As of QT, well, it is nice and cross-platform technology, tho if you want to see it in action, just look at the EA Origin desktop client - it is horrible and very laggy.

You can create any ui with the Win32 API.

You can hack DirectX in any ui library/framework, so thats not a plus. WPF is friendly in use, especially when someone with XAML knowledge has to create the ui and another writes the code behind it.

Please show me the way to make VS2012 UI by means of pure Win32 API.

What part seems impossible to you? The menu is rather simple, and the main tab, is nothing than a custrom drawn tabcontrol (this takes lots of code, but its not really hard to create, just time). Most buttons are simple rectangle buttons with no border and the same background as the window behind it. It costs time, but its far from impossible.

This UI in particular is possible, because you don't have text-over-image or text-over-gradients.

With Win32 you can actually have callbacks for common controls (created by CreateWindow - e.g. buttons) where you manually draw the control with the standard approach (handling yet more messages). The biggest problem I haven't been able to figure out with GDI is how to draw text on a picture. From what I understand, GDI doesn't draw text on transparent surfaces. It can fake transparency with bitmaps, but text is another story.

In defense of WPF - one of our products is based on WPF. The version that shipped with 3.5 is quite buggy (try text rendering with DPI != 96 and some AMD cards). I passionately hate WPF for its steep learning curve (and probably the worst discoverability in any API I've ever used). Yet, you can do some pretty damn awesome UI with it, very quickly. And the added bonus is that it works on very slow computers (we are talking single-core, real ancient stuff). In fact, some programs in Windows are created with WPF (e.g. Media Center, but I can't find a proper reference).

To be honest, when I had to implement custom UI for an installer, I ditched GDI and rolled my own with D2D/DWrite/WIC. That way I don't have to switch context too much over how the UI is drawn in the game and in the installer.

WPF and the associated tools at the very bottom do use win32 API (it's turtles all the way down...)


I have downvoted you because that statement is actually not true.

WPF takes care of all it's own drawing, event-handling, etc. From a win32 perspective, a wpf app is a blackbox with only one hwnd for the outer window, as opposed to say winforms, which simply wraps Win32 in a more developer friendly api.

Sure it's true, but thanks for the downvote anyways. "All" you need to do is implement a drawing system and an event system on top of win32. Not that anyone probably would, becaus there are smarter ways. But if you want to belive it's a magic black box that has nothing to do with win32, feel free to do so.

For those of you who are still wondering if something similar can be implemented in win32, see this: http://bcgsoft.com/featuretour/tour325.htm

This UI in particular is possible, because you don't have text-over-image or text-over-gradients.


I'm not sure what you mean here, both are pretty simple.

No you can't create anything like this with native Win32 API.

Visual Studio uses WPF, which is very cool for interfaces, but it is managed technology, thus can be accessed only via C#, C++/CLI. WPF uses hardware acceleration by utilizing DirectX, thus it is very fast if you omit the drawbacks of its internal rendering algorithms. It is excellent if you want to create an applications with complex and highly customizable UI. You can even embed DirectX content into WPF form, which is the very fast and cheap way of creating cool-looking UI. Tho it will be a bit complex, but definitely possible. As of QT, well, it is nice and cross-platform technology, tho if you want to see it in action, just look at the EA Origin desktop client - it is horrible and very laggy.

You can create any ui with the Win32 API.

You can hack DirectX in any ui library/framework, so thats not a plus. WPF is friendly in use, especially when someone with XAML knowledge has to create the ui and another writes the code behind it.

Please show me the way to make VS2012 UI by means of pure Win32 API.

What part seems impossible to you? The menu is rather simple, and the main tab, is nothing than a custrom drawn tabcontrol (this takes lots of code, but its not really hard to create, just time). Most buttons are simple rectangle buttons with no border and the same background as the window behind it. It costs time, but its far from impossible.

I asked how to do that. Please provide me some links to tutorials where they are doing modern eye-candy elements with pure WinAPI. I'm seriously interested in it.

This topic is closed to new replies.

Advertisement