As far as i know the Windows SDK provided by Microsoft can be used only with Visual Studio, but MinGW comes with some headers (included windows.h and winnt.h) so include that, and if they don't provide the same functionality (or you require more functionality that is not provided by MinGW headers) you need to switch to Visual Studio.
I just built a simple Winapi "hello world" and it works (Qt SDK beta - as far as i know uses MinGW 4.4.0):
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, L"Hello world!", L"Note", MB_OK);
return 0;
}
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, L"Hello world!", L"Note", MB_OK);
return 0;
}
To copy to clipboard, switch view to plain text mode
Bookmarks