분류 전체보기
-
MFCPlatform/File(장치 IO) 2008. 12. 6. 23:31
CFile Delete(); } BYTE buffer[0x1000]; DWORD dwBytesRemaining = file.GetLength(); while (dwBytesRemaining) { DWORD dwPosition = file.GetPosition(); UINT nBytesRead = file.Read(buffer, sizeof(buffer)); ... file.Seek(dwPosition, CFile::begin); file.Write(buffer, nBytesRead); dwBytesRemaining -= nBytesRead; } BOOL CMyFtpView::DownLoad(CString strName, DWORD dSize) { int num=0; num = (int)(dSize/512..
-
리스트 컨트롤 - MFCGUI/컨트롤 2008. 12. 6. 16:36
리스트 컨트롤 CListCtrl LVS_EX_FULLROWSELECT LVS_EX_CHECKBOXES OnDblclkList LVN_ITEMCHANGED .SetImageList() .SetExtendedStyle() LVS_EX_FULLROWSELECT LVS_EX_GRIDLINES .InsertColumn() LVCFMT_LEFT|LVCFMT_CENTER|LVCFMT_RIGHT .GetItemCount() .DeleteItem() .DeleteAllItems() .InsertItem() .SetItemText() .SetItem() .GetSelectedCount() .GetFirstSelectedItemPosition() .GetNextSelectedItem() .GetSelectionMark() ..
-
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..
-
확장자 지원MFC 2008. 12. 6. 01:12
BOOL CTry01App::InitInstance() { ... pDocTemplate = new CSingleDocTemplate( IDR_MAINFRAME, RUNTIME_CLASS(CTry01Doc), RUNTIME_CLASS(CMainFrame), // main SDI frame window RUNTIME_CLASS(CTry01View)); AddDocTemplate(pDocTemplate); // { // Enable DDE Execute open EnableShellOpen(); RegisterShellFileTypes(TRUE); // } // Parse command line for standard shell commands, DDE, file open CCommandLineInfo cm..