setup_native_frameless

Function setup_native_frameless 

Source
pub(super) unsafe fn setup_native_frameless(hwnd: *mut c_void)
Expand description

Set up a native frameless window: extend client area over the thick frame border so the resize handle is invisible, then subclass the window to handle WM_NCHITTEST for edge resize.

DwmExtendFrameIntoClientArea(-1) makes the entire frame transparent, but it also removes the non-client hit-test region. Without the subclass, Windows can’t tell which part of the window edge should be a resize handle. The subclass returns HT{LEFT,RIGHT,TOP,BOTTOM,TOPLEFT,…} when the cursor is within RESIZE_BORDER pixels of the window edge.