borderless

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@303 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-13 06:30:36 +00:00
parent 9fd99d3ab2
commit 28250bbaab
16 changed files with 104 additions and 2 deletions

View File

@@ -488,3 +488,17 @@ void MwLLSetSizeHints(MwLL handle, int minx, int miny, int maxx, int maxy) {
u->max.x = maxx;
u->max.y = maxy;
}
void MwLLMakeBorderless(MwLL handle, int toggle) {
LPARAM lp = GetWindowLongPtr(handle->hWnd, GWL_STYLE);
if(toggle) {
lp &= ~WS_CAPTION;
} else {
lp |= WS_CAPTION;
}
SetWindowLongPtr(handle->hWnd, GWL_STYLE, lp);
SetWindowPos(handle->hWnd, NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
}