正在加载图片...
/Windows应用程序的主函数 #include<windows.h>/Vindows,所提供的API声明文件。 int APIENTRY WinMain(HINSTANCE hInstance,/本实例标识(Handle HINSTANCE hPrevInstance,/上一个实例标识 LPSTR IpCmdLine,/命令行参数 int nCmdShow)/主窗口显示方式 {/注册窗口类(下面是个示意,函数参数实际为一个结构WNDCLASS) RegisterClass(...,WindowProc,"my_window_class");// /创建并显示主窗口 HWND hWnd; hWnd=CreateWindow("my_window_class",...,x,y,width,height,...); ShowWindow(hWnd,nCmdShow); /消息循环,直到接收到WM QUIT消息 while(GetMessage(&msg,NULL,O,O)/从消息队列中取消息。 { DispatchMessage(&msg);/把消息发送到程序相应的窗口。 return msg.wParam;//Windows应用程序的主函数 #include <windows.h> //Windows所提供的API声明文件。 int APIENTRY WinMain(HINSTANCE hInstance, //本实例标识(Handle) HINSTANCE hPrevInstance, //上一个实例标识 LPSTR lpCmdLine, //命令行参数 int nCmdShow ) //主窗口显示方式 { //注册窗口类(下面是个示意,函数参数实际为一个结构WNDCLASS) RegisterClass(..., WindowProc, "my_window_class"); //示意 ...... //创建并显示主窗口 HWND hWnd; hWnd=CreateWindow("my_window_class",…,x,y,width,height,...); ShowWindow(hWnd, nCmdShow); ...... //消息循环,直到接收到WM_QUIT消息 while (GetMessage(&msg, NULL, 0, 0)) //从消息队列中取消息。 { ...... DispatchMessage(&msg); //把消息发送到程序相应的窗口。 } return msg.wParam; }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有