Jump to content
  • Advertisement
Sign in to follow this  
Sock5

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

This topic is 2164 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

 

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.

 

 

What I mean is that functions like TextOut and DrawText seem to be drawing solid color background. I might have missed something, but the last time I tried, I couldn't figure out how to draw text on an image without that solid color background. I spent a few hours trying different thing. and I finally ditched DPI. If you have solid background, it is trivially easy to draw text.

Share this post


Link to post
Share on other sites
Advertisement

 

 

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.

 

 

What I mean is that functions like TextOut and DrawText seem to be drawing solid color background. I might have missed something, but the last time I tried, I couldn't figure out how to draw text on an image without that solid color background. I spent a few hours trying different thing. and I finally ditched DPI. If you have solid background, it is trivially easy to draw text.

 

 

SetBkMode

 

(Also it's GDI, not DPI wink.png )

Edited by achild

Share this post


Link to post
Share on other sites

 

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.

 

 

In relation to the screenshots the OP posted, all I see is flat shaded rectangles. Where is the eye-candy in the VS2012 UI? Surely any graphics API can produce similar results.

Share this post


Link to post
Share on other sites

 

 

 

 

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.

 

Look at the post I made 6 up from here.

Share this post


Link to post
Share on other sites

It took me ~2 years to build this IDE on top of my GUI library which is in turn based on the win32 API :

 

 

[attachment=17940:ide_temp.png]

[attachment=17939:ide_temp2.png]
 

Let me know if you like it and/or how I can make it better smile.png

Share this post


Link to post
Share on other sites

 

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.

 

 

 

You can do almost any common effect with GDI only. The weakest point is antialiased drawing of shapes, which is not included by default in GDI (but can be done with GDI+ or Cairo, for example).

 

If you are really feeling the need of doing something that GDI can't handle on its own, there is always the option of rendering directly to the pixels with GetDIBits/SetDIBits, but that's rarely needed.

 

If you could be a little more specific about what kind of eye-candy you are looking for, maybe I can help.

Share this post


Link to post
Share on other sites

Sure it's true, but thanks for the downvote anyways.

 

 

I downvoted you because your information was incorrect and that is precisely the point of the downvote system. I felt kinda bad because I just thought you'd made an honest mistake. 

 

But if you insist on being wrong, well, for the benefit of others who might mistakenly believe you, prepare for learnings....

 

 

Below you can see a simple app written in winforms (which really is win32).

winforms.png

You can see the visual studio project open behind it. Notice that Spy++ shows us that there is a main window, and three subwindows (one each for the label, button and text box)

 

Here's the same app written in WPF.

wpf.png

Notice how there is only one window. 

 

Once again, WPF does not use win32, other that to create a host window which it fills itself. Everything within that window is handled by WPF.

 

So please stop talking about stuff you clearly know nothing about.

Share this post


Link to post
Share on other sites

 

Sure it's true, but thanks for the downvote anyways.

 

 

I downvoted you because your information was incorrect and that is precisely the point of the downvote system. I felt kinda bad because I just thought you'd made an honest mistake. 

 

But if you insist on being wrong, well, for the benefit of others who might mistakenly believe you, prepare for learnings....

 

 

Below you can see a simple app written in winforms (which really is win32).

 

You can see the visual studio project open behind it. Notice that Spy++ shows us that there is a main window, and three subwindows (one each for the label, button and text box)

 

Here's the same app written in WPF.

 

Notice how there is only one window. 

 

Once again, WPF does not use win32, other that to create a host window which it fills itself. Everything within that window is handled by WPF.

 

So please stop talking about stuff you clearly know nothing about.

 

What are you on about? I never said there was more than one win32 window.

 

I can render controls directly onto one window also. Does that mean I'm not using Win32?

Edited by wack

Share this post


Link to post
Share on other sites

 

Once again, WPF does not use win32, other that to create a host window which it fills itself. Everything within that window is handled by WPF.

 

 

They're called windowless controls, and used to be shipped with VS. Everything you've shown can be accomplished using Win32. The project I am currently working on is based 100% on windowless controls - the only difference is I choose to use OpenGL as the graphics API rather than GDI for performance reasons.

Edited by mark ds

Share this post


Link to post
Share on other sites

What are you on about? I never said there was more than one win32 window.
 
I can render controls directly onto one window also. Does that mean I'm not using Win32?


Oh FFS.

But if you want to belive it's a magic black box that has nothing to do with win32, feel free to do so.

That's exactly what it is.
 
WPF renders all it's content onto a ContentControl. None of the controls within that use Win32 for rendering. The input handling is not handled by win32 other than to notify the top level HWnd. WPF has a completely separate system for laying out and arranging controls.
 
Saying WPF uses Win32 under the hood is a gross misrepresentation of the way WPF actually works.

Share this post


Link to post
Share on other sites

This topic is 2164 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!