#include <windows.h>
LRESULT CALLBACK WindowProc(
HWND hwnd, // handle to window
UINT uMsg, // message identifier
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
int WINAPI WinMain(
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // command line
int nCmdShow // show state
){
static LPCTSTR lpszClassName = TEXT("HelloWin");
LPCTSTR lpWindowName = TEXT("MyApp");
HWND hwnd;
MSG msg;
//http://www.pythonschool.com/
WNDCLASS wndclass = {
CS_HREDRAW|CS_VREDRAW,
WindowProc,
0,
0,
hInstance,
LoadIcon(hInstance, IDI_ERROR),
LoadCursor(hInstance, IDC_CROSS),
(HBRUSH)GetStockObject(WHITE_PEN),
(LPCTSTR)NULL,
lpszClassName
} ;
if(!RegisterClass(&wndclass))
return FALSE;
hwnd = CreateWindow(
lpsz
C++实例 窗口和消息 处理关闭窗口消息 是否关闭
最新推荐文章于 2019-05-30 09:02:03 发布