MFC
-
컨트롤 바MFC 2010. 6. 26. 18:07
CFrameWnd .DockControlBar() CControlBar -> CWnd 도킹 기능 .ShowControlBar()
-
-
CWinAppMFC 2008. 12. 8. 18:06
AfxGetInstanceHandle() CWinApp (OnFileNew) // ID_FILE_NEW CDocument::OnNewDocument (OnFileSave, OnFileSaveAs) // ID_FILE_SAVE, ID_FILE_SAVE_AS CDocument::OnOpenDocument (OnFileOpen) // ID_FILE_OPEN CDocument::OnOpenDocument ::AfxGetApp() m_lpCmdLine .OpenDocumentFile() .SetRegistryKey() HKEY_CURRENT\USER\Software\{..}\{실행 파일의 이름} .WriteProfileInt() HKEY_CURRENT\USER\Software\{..}\{실행 파일의 이름}\{....
-
Multi View - SDIMFC 2008. 12. 8. 16:57
class CMainFrame : public CFrameWnd { ... // Generated message map functions protected: //{{AFX_MSG(CMainFrame) afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); afx_msg void OnViewChange(); //}}AFX_MSG DECLARE_MESSAGE_MAP() // { private: void SecondView(); void FirstView(); int m_nViewFlag; enum {FIRSTVIEW=1, SECONDVIEW}; CPractice10_3View *m_pFirstView; // 두개의 뷰 클래스 에 대한 CSecondView *m_pSec..
-
CViewMFC 2008. 12. 6. 16:31
CView on PreCreateWindow OnInitialUpdate // 초기화는 여기? 새로운 문서나 기존 문서가 열릴 때? c.f. 자식창 생성은 OnCreate OnUpdate // virtual - CDocument에서 UpdateAllViews() 멤버함수를 호출시 불려진다. The default implementation of OnUpdate invalidates the view's entire client area. OnDraw c.f. OnPaint, OnPrint .GetParentFrame() .GetDocument() CScrollView -> CView .SetScrollSizes() .ResizeParentToFit() void CImageView::OnInitialUpdat..
-
CFrameWndMFC 2008. 12. 6. 16:10
CFrameWnd ::AfxGetMainWnd() .PreCreateWindow() // virtual OnCreateClient 뷰를 생성한다. .EnableDocking() CBRS_ALIGN_ANY .DockControlBar() AFX_IDW_DOCKBAR_LEFT .GetActiveView() .SetActiveView() .GetActiveDocument() .CreateView() .RecalcLayout() call CWnd::RepositionBars() .GetMessageBar() // 전체 윈도우의 크기를 설정 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { if( !CFrameWnd::PreCreateWindow(cs) ) return..
-
-
CDocument 파일 입출력MFC 2008. 12. 6. 15:44
BOOL CPractice5_1Doc::OnNewDocument() { if (!CDocument::OnNewDocument()) return FALSE; // TODO: add reinitialization code here // (SDI documents will reuse this document) // { ... // } return TRUE; } BOOL CPractice5_1Doc::OnSaveDocument(LPCTSTR lpszPathName) { // TODO: Add your specialized code here and/or call the base class // { ... // } return CDocument::OnSaveDocument(lpszPathName); } BOOL C..