Search code examples
c++user-interfacewindowdirectxdirect2d

How do I use Direct2D to create custom window chrome?


I am extremely new to Direct2D after just looking at the MSDN start guide and API reference, and it seems to me that there is only CreateHwndRenderTarget() if you want to use the standard winAPI C++ GUI model with a message pump and HWNDs.

However, the CreateHwndRenderTarget() only renders to the client area. If possible, I would like to draw my own window chrome and have controls in the title bar. How do I use Direct2D for this?


Solution

  • Rendering custom chrome like that shouldn't require any specific tricks for Direct2D. You should be able to rely on any "old" article that talks about these techniques but that use GDI or GDI+.