5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-04 11:00:32 +08:00

[windows] StartHidden

This commit is contained in:
Lea Anthony 2021-04-25 15:27:09 +10:00
parent df41e8eb3a
commit 134b41e4be

View File

@ -112,7 +112,14 @@ void Run(struct Application* app, int argc, char **argv) {
SetWindowLongPtr(app->window, GWLP_USERDATA, (LONG_PTR)app);
MSG msg;
ShowWindow(app->window, SW_SHOWNORMAL);
// Process whether window should show by default
int initialCmdShow = SW_SHOWNORMAL;
if ( app->startHidden == 1 ) {
initialCmdShow = SW_HIDE;
}
ShowWindow(app->window, initialCmdShow);
UpdateWindow(app->window);
BOOL res;
while ((res = GetMessage(&msg, NULL, 0, 0)) != -1) {