MFC Document 창 size 조절하기
- Module/WindowsMFC
- 2008. 12. 23.
소스는 정말 간단하다....
두줄만 추가하면된다.
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CMDIFrameWnd::PreCreateWindow(cs) )
return FALSE;
cs.cx = 640;
cs.cy = 580;
// TODO: CREATESTRUCT cs를 수정하여 여기에서
// Window 클래스 또는 스타일을 수정합니다.
return TRUE;
}
그럼 정의를 찾아보자.
typedef struct tagCREATESTRUCT { LPVOID lpCreateParams; HANDLE hInstance; HMENU hMenu; HWND hwndParent; int cy; int cx; int y; int x; LONG style; LPCSTR lpszName; LPCSTR lpszClass; DWORD dwExStyle; } CREATESTRUCT;
파라미터들..
lpCreateParams
Points to data to be used to create the window.
Identifies the module-instance handle of the module that owns the new window.
Identifies the menu to be used by the new window. If a child window, contains the integer ID.
Identifies the window that owns the new window. This member is NULL if the new window is a top-level window.
Specifies the height of the new window.
Specifies the width of the new window.
Specifies the y-coordinate of the upper left corner of the new window. Coordinates are relative to the parent window if the new window is a child window; otherwise coordinates are relative to the screen origin.
Specifies the x-coordinate of the upper left corner of the new window. Coordinates are relative to the parent window if the new window is a child window; otherwise coordinates are relative to the screen origin.
Specifies the new window's style.
Points to a null-terminated string that specifies the new window's name.
Points to a null-terminated string that specifies the new window's Windows class name (a WNDCLASS structure; for more information, see the Windows SDK).
Specifies the extended style for the new window.
'Module > WindowsMFC' 카테고리의 다른 글
WM_CLOSE / WM_DESTROY (0) | 2009.04.29 |
---|---|
MFC Explorer 실행하기 (0) | 2008.12.23 |
CString <-> wchar_t * (0) | 2008.12.12 |
MFC flash 연동하기 - 2 (0) | 2008.10.28 |
CString <-> char 변환 (0) | 2008.10.27 |