Skip to content

Commit 747bfbe

Browse files
authored
Merge pull request #54 from mkulesh/main
#51 Add/document "Hidden at launch" mechanism for Windows: updated RE…
2 parents d78b0a3 + dc7dc1a commit 747bfbe

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
276276

277277
##### macOS
278278

279+
Change the file MainFlutterWindow.swift as follows:
280+
279281
```diff
280282
import Cocoa
281283
import FlutterMacOS
@@ -301,6 +303,24 @@ class MainFlutterWindow: NSWindow {
301303

302304
```
303305

306+
##### Windows
307+
308+
Change the file windows\runner\win32_window.cpp as follows:
309+
310+
```diff
311+
bool Win32Window::CreateAndShow(const std::wstring& title,
312+
const Point& origin,
313+
const Size& size) {
314+
...
315+
HWND window = CreateWindow(
316+
- window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE,
317+
+ window_class, title.c_str(),
318+
+ WS_OVERLAPPEDWINDOW, // do not add WS_VISIBLE since the window will be shown later
319+
Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),
320+
Scale(size.width, scale_factor), Scale(size.height, scale_factor),
321+
nullptr, nullptr, GetModuleHandle(nullptr), this);
322+
```
323+
304324
## Who's using it?
305325

306326
- [AuthPass](https://authpass.app/) - Password Manager based on Flutter for all platforms. Keepass 2.x (kdbx 3.x) compatible.

0 commit comments

Comments
 (0)