windows Api 一日一练 (1)

 

学习自:http://blog.csdn.net/caimouse/article/details/1675586

#include <windows.h>

int WINAPI WinMain( HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // command line
int nCmdShow // show state
)


{
HWND hwnd = GetDesktopWindow();
MessageBoxA(hwnd,"第一个例子","这是标题",MB_OK);
return 0;
}

 

 

code::blocks 编译通过

posted @ 2014-01-01 19:11  rainboy  阅读(208)  评论(0编辑  收藏  举报