该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
//下面是一个WIN32 API写的窗体,是不是C写的?你觉得。。。
#include
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch( msg )
{
case WM_DESTROY:
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hwnd, msg, wparam, lparam);
}
int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hpreinstance, PSTR cmdline, int showcmd)
{
HWND hwnd;
WNDCLASS wndclass;
char szAppName[] = "ya~~~";
MSG message;
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 = szAppName;
wndclass.style = CS_HREDRAW|CS_VREDRAW;
RegisterClass(&wndclass);
hwnd = CreateWindow(szAppName, "Caption",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
0, 0,
hinstance, 0);
ShowWindow(hwnd, showcmd);
while( GetMessage(&message, 0, 0, 0) )
{
TranslateMessage(&message);
DispatchMessage(&message);
}
return message.wParam;
}