GUI
-
다이얼로그 박스 - MFCGUI/Window 2008. 12. 10. 23:43
대화상자에서 사용자의 모든 키 입력은 대화상자가 먼저 받으며 포커스를 가진 컨트롤이 원할 경우만 컨트롤에게 전달된다. 컨트롤보다 엔터키(Tab, Enter, Esc, 커서 이동키 등)를 먼저 받는다. // ?? CDialog -> CWnd OnInitDialog UpdateData(FALSE) OnOK UpdateData(TRUE) OnCancel OnPaint .Create() .DestroyWindow() .UpdateData() .GotoDlgCtrl() Enter, ESC 키 무시 OnCancel을 오버라이드하면 다이얼로그 창을 닫을 수 없다. BOOL CProcessADlg::PreTranslateMessage(MSG* pMsg) { // TODO: Add your specialized code..
-
Animation - MFCGUI/GDI 2008. 12. 10. 01:37
class CPractice7_2View : public CView { ... protected: // Generated message map functions protected: //{{AFX_MSG(CPractice7_2View) ... afx_msg void OnAnimationStart(); afx_msg void OnAnimationStop(); afx_msg void OnTimer(UINT nIDEvent); //}}AFX_MSG DECLARE_MESSAGE_MAP() private: static int bitmap_inc; // 애니메이션 카운터 증가변수 void ShowCharacter( ); int m_nBitmapMode; }; int CPractice7_2View::bitmap_inc..
-
비트맵 - MFCGUI/GDI 2008. 12. 10. 01:18
MFC는 DIB를 지원하지 않는다. CBitmap .CreateBitmap() .LoadBitmap() .CreateCompatibleBitmap() CWnd .GetDesktopWindow() CDC .CreateCompatibleDC() .SelectObject() .BitBlt() SRCCOPY|SRCAND|SRCPAINT CClientDC -> CDC CWindowDC -> CDC void CMemDrawView::OnDraw(CDC* pDC) { CBitmap bmpBuffer; CDC BufferDC; BufferDC.CreateCompatibleDC(pDC); bmpBuffer.CreateCompatibleBitmap(pDC, 200, 200); CBitmap *pOldBitmap = (CB..
-
툴바 - MFCGUI/컨트롤 2008. 12. 8. 20:35
CFrameWnd -> CWnd .EnableDocking() CBRS_ALIGN_ANY .DockControlBar() AFX_IDW_DOCKBAR_BOTTOM AFX_IDW_DOCKBAR_LEFT. .FloatControlBar() .LoadBarState() .SaveBarState() CControlBar -> CWnd GetWindowRect(rcChild); ScreenToClient(rcChild); rcChild.OffsetRect(ptOffset); pwndChild->MoveWindow(rcChild, FALSE); pwndChild = pwndChild->GetNextWindow(); } CRect rcWindow; GetWindowRect(rcWindow); rcWindow.righ..
-
키보드/마우스 버튼 - MFCGUI/컨트롤 2008. 12. 8. 18:02
CWnd WM_CHAR VK_BACK WM_KEYDOWN VK_LEFT VK_RIGHT VK_UP VK_DOWN VK_PRIOR VK_NEXT VK_HOME class CPractice3_3View : public CView { // { CPoint m_ptNow; CString m_strOutText; // } protected: // create from serialization only CPractice3_3View(); ... // Generated message map functions protected: //{{AFX_MSG(CPractice3_3View) afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); afx_msg void OnKe..
-
스플리터(정적 분할 윈도우) - MFCGUI/컨트롤 2008. 12. 8. 17:10
CSplitterWnd .CreateStatic() .CreateView() .SetRowInfo() .GetPane() class CMainFrame : public CFrameWnd { ... // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMainFrame) ... protected: virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); //}}AFX_VIRTUAL ... private: CSplitterWnd m_wndSplit; // 멤버 변수 등록 }; BOOL CMainFrame::OnCreateClient(LPC..
-
리스트 컨트롤 - 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() ..