본문 바로가기
C & C++/MFC 컨트롤

[상태바] 상태바 설정

by izen8 2011. 5. 21.
반응형

- Header

public:
 CStatusBarCtrl m_StatusBar;

- CPP

 m_StatusBar.Create(WS_CHILD|WS_VISIBLE|SBT_OWNERDRAW, CRect(0,0,0,0), this, 0);
 int strPartDim[4]= {180, 300, 300, 450  -1};
 m_StatusBar.SetParts(4, strPartDim);
 m_StatusBar.SetText("테스트1", 0, 0);
 m_StatusBar.SetText("테스트2", 1, 0);
 m_StatusBar.SetText("아이콘", 3 ,SBT_NOBORDERS);
 m_StatusBar.SetIcon(3,
  SetIcon(AfxGetApp()->LoadIcon(IDR_MAINFRAME),
   FALSE));

반응형

댓글