Last active
June 30, 2020 06:44
-
-
Save brainwo/a693b0ab390c4403919bad2d84c6f574 to your computer and use it in GitHub Desktop.
Borderless Windows App (Flutter)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Get monitor size | |
| // https://stackoverflow.com/a/10845821 | |
| MONITORINFO info; | |
| info.cbSize = sizeof(MONITORINFO); | |
| GetMonitorInfo(monitor, &info); | |
| int monitor_width = info.rcMonitor.right - info.rcMonitor.left; | |
| int monitor_height = info.rcMonitor.bottom - info.rcMonitor.top; | |
| // Create window | |
| // https://books.google.co.id/books?id=nDnSBQAAQBAJ&pg=PA59&lpg=PA59 | |
| HWND window = CreateWindow( | |
| window_class, title.c_str(), WS_EX_TOPMOST | WS_VISIBLE | WS_POPUP, | |
| Scale(0, scale_factor), Scale(0, scale_factor), | |
| Scale(monitor_width, scale_factor), Scale(monitor_height, scale_factor), | |
| nullptr, nullptr, GetModuleHandle(nullptr), this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment