Skip to content

Commit 811793f

Browse files
authored
[Windows] Implement SetResizable for windows (#204)
* [Windows] Implement SetResizable for windows implemwnt SetRezizable for Windows * [Windows] refine SetResizable
1 parent 9026bb1 commit 811793f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

windows/window_manager.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,16 @@ bool WindowManager::IsResizable() {
557557
}
558558

559559
void WindowManager::SetResizable(const flutter::EncodableMap& args) {
560+
HWND hWnd = GetMainWindow();
560561
is_resizable_ =
561562
std::get<bool>(args.at(flutter::EncodableValue("isResizable")));
563+
DWORD gwlStyle = GetWindowLong(hWnd, GWL_STYLE);
564+
if (is_resizable_) {
565+
gwlStyle |= WS_THICKFRAME;
566+
} else {
567+
gwlStyle &= ~WS_THICKFRAME;
568+
}
569+
::SetWindowLong(hWnd, GWL_STYLE, gwlStyle);
562570
}
563571

564572
bool WindowManager::IsMinimizable() {

0 commit comments

Comments
 (0)