惧留孙网
网站首页
在线教程
下载专区
用户文章
反馈建议
在线聊天
我的帐户
返回到教程
CPP文件下载:
14ansi.zip
//http://www.juliusun.com/class/ #include
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { CHAR strTitle[] = "惧留孙课堂"; CHAR strWndClass[] = "testclass"; WNDCLASSEX w; w.cbClsExtra = 0; w.cbWndExtra = 0; w.cbSize = sizeof WNDCLASSEX; w.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); w.hCursor = LoadCursor(NULL, IDC_ARROW); w.hIcon = LoadIcon(NULL, IDI_APPLICATION); w.hIconSm = w.hIcon; w.hInstance = hInstance; w.lpfnWndProc = WndProc; w.lpszClassName = strWndClass; w.lpszMenuName = NULL; w.style = CS_DBLCLKS; if (0 == RegisterClassEx(&w)) { return 1; } HWND hWnd = CreateWindowEx(0, strWndClass, strTitle, WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX, 200, 100, 900, 500, NULL, NULL, hInstance, NULL); if (NULL == hWnd) { return 1; } ShowWindow(hWnd, SW_NORMAL); UpdateWindow(hWnd); MSG Msg; while (GetMessage(&Msg, NULL, 0, 0)) { TranslateMessage(&Msg); DispatchMessage(&Msg); } return 0; } LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_CREATE: #define IDS_CONTENT 103 CreateWindowEx(0, "static", "这是我要展示的信息", WS_CHILD | WS_VISIBLE, 10, 10, 200, 30, hWnd, (HMENU)IDS_CONTENT, ((LPCREATESTRUCT)lParam)->hInstance, NULL); break; case WM_CLOSE: DestroyWindow(hWnd); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, uMsg, wParam, lParam); } return 0; }
返回到教程
<div class="container" style="margin-top:30px;"> <div class="_w4k367j9lc"></div> <script type="text/javascript"> (window.slotbydup = window.slotbydup || []).push({ id: "u7003084", container: "_w4k367j9lc", async: true }); </script> <!- - 多条广告如下脚本只需引入一次 - -> <script type="text/javascript" src="//cpro.baidustatic.com/cpro/ui/cm.js" async="async" defer="defer"> </script> </div>
<div class="container" style="margin-top:30px;"> <div class="_sakwl5k51bf"></div> <script type="text/javascript"> (window.slotbydup = window.slotbydup || []).push({ id: "u7003089", container: "_sakwl5k51bf", async: true }); </script> <!- - 多条广告如下脚本只需引入一次 --> <script type="text/javascript" src="//cpro.baidustatic.com/cpro/ui/cm.js" async="async" defer="defer"> </script> </div>
©2015-2025 惧留孙网 juliusun.com
京ICP备15039193号-1
首页
教程
下载
文章
聊天
我的