Skip to content

Instantly share code, notes, and snippets.

@Temptationx
Last active January 1, 2016 04:19
Show Gist options
  • Save Temptationx/8091388 to your computer and use it in GitHub Desktop.
Save Temptationx/8091388 to your computer and use it in GitHub Desktop.
remove window border win32api
LONG lStyle = GetWindowLong(hwnd, GWL_STYLE);
lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
SetWindowLong(hwnd, GWL_STYLE, lStyle);
LONG lExStyle = GetWindowLong(hwnd, GWL_EXSTYLE);
lExStyle &= ~(WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE);
SetWindowLong(hwnd, GWL_EXSTYLE, lExStyle);
SetWindowPos(hwnd, NULL, 0,0,0,0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment