- 127 名前:生徒BLUE@入隊希望 [04/06/23 15:21 ID:G2RbfgcV]
- >>125の続き
//640x480ってひょっとしてクライアントウィンドウじゃなくてウィンドウのサイズでよかったですか? int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPreInst,LPSTR lpszCmdLine, int nCmdShow) { HWND hWnd; MSG msg; WNDCLASS myProg; if (!hPreInst) { myProg.style =CS_HREDRAW | CS_VREDRAW; myProg.lpfnWndProc =WndProc; myProg.cbClsExtra =0; myProg.cbWndExtra =0; myProg.hInstance =hInstance; myProg.hIcon =NULL; myProg.hCursor =LoadCursor(NULL, IDC_ARROW); myProg.hbrBackground =(HBRUSH)GetStockObject(WHITE_BRUSH); myProg.lpszMenuName =NULL; myProg.lpszClassName =szClassNme; if (!RegisterClass(&myProg)) return FALSE; } RECT rect; rect.top = 0; rect.left = 0; rect.right = WIDTH; rect.bottom = HEIGHT; DWORD style=WS_BORDER | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX; AdjustWindowRect(&rect, style, FALSE); int width = rect.right - rect.left; int height = rect.bottom - rect.top; hWnd=CreateWindow(szClassNme, "【初心者】課題をクリアしていくスレ【講習会】", style, CW_USEDEFAULT,0,width,height,NULL,NULL,hInstance,NULL); ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return (msg.wParam); }
|

|