|
#include<windows.h>
#define WIN32_LEANAND_MEAN
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd)
{
HWND hWnd;
WNDCLASSEX myclass;
myclass.cbClsExtra=0;
myclass.cbSize=sizeof(WNDCLASSEX);
myclass.cbWndExtra=0;
myclass.hCursor=LoadCursor(NULL,IDC_ARROW);
myclass.hIcon=LoadIcon(NULL,IDI_WINLOGO);
myclass.hIconSm=LoadIcon(NULL,IDI_WINLOGO);
myclass.hInstance=hInstance;
myclass.lpfnWndProc=NULL;//MsgHandler;
myclass.lpszClassName="yagas";
myclass.lpszMenuName=NULL;
myclass.style=CS_VREDRAW;
myclass.hbrBackground=(HBRUSH) GetStockObject(WHITE_BRUSH);
if(!(hWnd=CreateWindowEx(NULL,"myclass","这是我的程序!",WS_VISIBLE|WS_POPUP,0,0,300,400,NULL,NULL,hInstance,NULL)))
return(0);
ShowWindow(hWnd,SW_SHOW);
UpdateWindow(hWnd);
MessageBox(NULL,"我的程序呀!!","哈哈哈",MB_OK);
}
[em7] [em7] |
|