I\'m using MinGW to build my application on Windows. When compiling and linking, the option \"-mwindows\" is put in command line to have Win32 API functions.
To be more
You need to manually capture hInstance and nCmdShow (WinMain arguments). You can use the following C functions to do this:
HINSTANCE GetHInstance( ) {
return (HINSTANCE) GetModuleHandleW(NULL);
}
int GetNCmdShow() {
STARTUPINFOW startupInfo;
GetStartupInfoW(&startupInfo);
if ((startupInfo.dwFlags & STARTF_USESHOWWINDOW) != 0) {
return startupInfo.wShowWindow;
}
return SW_SHOWDEFAULT;
}