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

I'm refering to this type of interface:
DPc.pngpIdSY.png

I can do it with the engine in-game, but that would be very heavy(and power consuming if you're on an unplugged desktop) and I want to make a lightweight editor program where only a window in the middle is used for rendering and the interface around it controls what happens in the render window pretty much like any other engine editor.Now in Visual Studio you see every widget is custom and extremely beautiful, from the buttons to the sliders and also the awesome win8 style thumbnails in the product videos:
VisualStudio2013Preview.png

So can you direct me?Is this done with C++ and Win32?Or is it some HTML parser and made like a webpage?I'd prefer to use a C++ approach for squeezing every bit of performance and making it as lightweight and responsive as possible.

>removed<

Advertisement

Why would you want to copy Visual Studio 2012's interface? It's the worst looking UI ever conceived. wacko.png

I believe the UI is written in WPF.

You could do something like that in C++, and it would potentially be more performant (depending on your own abilities), but be prepared for a lot more work.

If you're looking for "lightweight and responsive", then WPF is not your friend.

if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
It's definitely possible, WPF and the associated tools at the very bottom do use win32 API (it's turtles all the way down...)

The graphical parts become easier if you use GDI+ or Cairo or similar. But make no mistake, there will be lots and lots of work to get it done.

If it's an option for you to use MFC to do this, there are third-party libraries that can do a pretty good approximation of the VS2012 UI and many of its controls.


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.

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

If your going to stick with C++, I'd give Qt a try. With Qt you can style your UI (if you so wish) using CSS-like stylesheets. Qt has the added benefit of being open-source and cross platform.


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.

So, this needs a bit of expansion...

WPF, as it stands, is really a shitty platform to write for. Its great for small apps, and even some simple business apps.

However, the rendering system in it is really stupidly written. As if it was written by people who had no idea about how modern GPUs work, etc.

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.

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

...snip...

So, this needs a bit of expansion...

WPF, as it stands, is really a shitty platform to write for. Its great for small apps, and even some simple business apps.

However, the rendering system in it is really stupidly written. As if it was written by people who had no idea about how modern GPUs work, etc.

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.

Well, that just isn't true! Yes the rendering system is very complex and you can get hopelessly lost if you go against the 'WPF way', (and you can get lost as a beginner too) but it is very powerful.

WPF is absolutely fine for large applications as well as small - it is just .Net at the end of the day. I use it to write incredibly complicated business apps as part of my day job, and I've also written a reasonably complex resource editor and also a boned sprite editor outside of work. The size / complexity of the application has no bearing on whether WPF is suitable.

Visual Studio does nothing (visually) that you couldn't do in plain WPF. I'd recommend it as a platform where you want to customize the UI, but just beware the learning curve is quite steep at times, and long.

Storm Clouds over the Western Front - 2D aerial combat WIP | DarklightXNA on Twitter | 2DFlightSim on Youtube

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.

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.

This topic is closed to new replies.

Advertisement