#include <windows.h>
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
{
if ( message==WM_DESTROY )
PostQuitMessage(0);
return DefWindowProc(hwnd, message, wparam, lparam);
}int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hpreinstance, PSTR CmdLine, int iCmdShow)
{
HWND hwnd;
MSG msg;
WNDCLASS wndclass;
static TCHAR szAppName[]=TEXT("HelloWin!"); wndclass.cbClsExtra =0;
wndclass.cbWndExtra =0;
wndclass.hbrBackground =(HBRUSH)GetStockObject(WHITE_BRUSH);
wndclass.hCursor =LoadCursor(NULL, IDC_ARROW);
wndclass.hIcon =LoadIcon(NULL, IDI_APPLICATION);
wndclass.hInstance =hinstance;
wndclass.lpfnWndProc =WndProc;
wndclass.lpszClassName =szAppName;
wndclass.lpszMenuName =NULL;
wndclass.style =CS_HREDRAW|CS_VREDRAW;
RegisterClass(&wndclass); hwnd=CreateWindow(szAppName,
TEXT("cAPTION"),
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
hinstance,
NULL); ShowWindow(hwnd, iCmdShow); while( GetMessage(&msg, NULL, 0, 0) )
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
{
if ( message==WM_DESTROY )
PostQuitMessage(0);
return DefWindowProc(hwnd, message, wparam, lparam);
}int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hpreinstance, PSTR CmdLine, int iCmdShow)
{
HWND hwnd;
MSG msg;
WNDCLASS wndclass;
static TCHAR szAppName[]=TEXT("HelloWin!"); wndclass.cbClsExtra =0;
wndclass.cbWndExtra =0;
wndclass.hbrBackground =(HBRUSH)GetStockObject(WHITE_BRUSH);
wndclass.hCursor =LoadCursor(NULL, IDC_ARROW);
wndclass.hIcon =LoadIcon(NULL, IDI_APPLICATION);
wndclass.hInstance =hinstance;
wndclass.lpfnWndProc =WndProc;
wndclass.lpszClassName =szAppName;
wndclass.lpszMenuName =NULL;
wndclass.style =CS_HREDRAW|CS_VREDRAW;
RegisterClass(&wndclass); hwnd=CreateWindow(szAppName,
TEXT("cAPTION"),
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
hinstance,
NULL); ShowWindow(hwnd, iCmdShow); while( GetMessage(&msg, NULL, 0, 0) )
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货