336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
MFC Dialog Position Save & Load
참조 : http://www.codeproject.com/Articles/1154/Saving-a-windows-size-position-and-state-in-MFC
Saving the window placement
BOOL CMainFrame::DestroyWindow() { WINDOWPLACEMENT wp; GetWindowPlacement(&wp); AfxGetApp()->WriteProfileBinary("MainFrame", "WP", (LPBYTE)&wp, sizeof(wp)); return CMDIFrameWnd::DestroyWindow(); }
Restoring the window placement
void CMainFrame::OnShowWindow(BOOL bShow, UINT nStatus) { CMDIFrameWnd::OnShowWindow(bShow, nStatus); static bool bOnce = true; if(bShow && !IsWindowVisible() && bOnce) { bOnce = false; WINDOWPLACEMENT *lwp; UINT nl; if(AfxGetApp()->GetProfileBinary("MainFrame", "WP", (LPBYTE*)&lwp, &nl)) { SetWindowPlacement(lwp); delete [] lwp; } } }
'Programming > MFC' 카테고리의 다른 글
[MFC] Dialog 닫기 (OnOK/EndDialog) (0) | 2017.02.08 |
---|---|
CWnd::Invalidate (0) | 2016.11.15 |
MFC - 다이얼로그 생성시 발생되는 메세지들... (0) | 2016.11.07 |
MFC x64 ADO msado15.dll (0) | 2016.10.28 |
x64 ADO import (0) | 2016.10.28 |