Jump to content
  • Advertisement
Sign in to follow this  
the_prodigy

How to implement ui elements that extend beyond the window frame

This topic is 1336 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

Hey guys,

 

I'm writing the gui for my editor from scratch (C++, DirextX11, Win 7 and newer). Everything worked out pretty nicely up to this point, but there is one thing I can't get my head around. The unreal engine for instance can render ui elements like context menus, menu bar items and tool tips outside of the window frame. The first thought that came to my mind was to disable the visual representation of my native window and scretch it over the whole screen. And then scale the DirectX framebuffer to the same size and draw my own window element. And so I did and I was able to make every blank cleared part of my framebuffer transparent with the DwmExtendFrameIntoClientArea function. An obvious probem that occurs is that user input in the transparent regions is still routed to my window and not to the underlying elements. But even if I would solve this issue there is probably a more reliable and cleaner way.

 

Any ideas and/or suggestions are very welcome.

 

 

Share this post


Link to post
Share on other sites
Advertisement

All of those elements will be standard popup windows, owned by the main window, and drawn using GDI, not D3D. All of this sort of stuff is standard windows programming, not DirectX.

Share this post


Link to post
Share on other sites

Hey guys,

 

I had a look at the Unreal Engine 4 source code and I thought it would be beneficial for everyone in my situation to share my new insights. The implementation is fairly straightforward every submenu, tool tip or context menu gets drawn on a newly created native window.

 

I will try to implement it in a similiar manner now.

 

Thanks for your replies.

Share this post


Link to post
Share on other sites

Every window is a rectangle. Every window drawn within that rectangle might be a child window, but not necessarily so. They might also be a separate window drawn above that window! Oh the complexities of modern OS's! (but it all makes sense when you get used to it!)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!