Skip to content

Latest commit

 

History

History

DwmApi

Custom frame in Windows Forms using DWM API

This sample demonstrates using DWM API to customize form non-client area. It uses DwmExtendFrameIntoClientArea function to extend frame into client area and adjusts messages handling to make sure mouse clicks are handled properly. Then we can put menu into the window caption. All controls put into former client area must be painted manually to be displayed.

Form Designer look:

designer

Runtime look:

runtime

Reqiures .NET 4.5+ & Windows Vista or newer (DWM Composition must be enabled on Vista/7).

Based on Custom Window Frame Using DWM.