summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp
blob: 29de8a5129ae782b4f22ecaf86a9072181f77bd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0


#include <windows.h>
#include <stdio.h>

int main()
{
    printf("Ready\n");
    fflush(stdout);

    MSG msg;
    while (GetMessage(&msg, NULL, 0, 0)) {
        if (msg.message == WM_CLOSE)
            PostQuitMessage(0);
    }

    return int(msg.wParam);
}