오후 8:05 2000-04-27
조경민
===================================================================
CMainFrame::OnCreate 에서
int nCount = m_wndReBar.GetReBarCtrl().GetBandCount();
CString strText = "Band #:";
for (int i=0; i<nCount; i++)
{
LPREBARBANDINFO prbbi = (LPREBARBANDINFO)alloca(sizeof(REBARBANDINFO));
prbbi->cbSize = sizeof(REBARBANDINFO);
CString strText;
strText.Format("Band #: %d", i);
LPTSTR lpszText = strText.GetBuffer(strText.GetLength());
prbbi->lpText = lpszText;
prbbi->clrBack = RGB(100,100,200);
prbbi->cch = strlen(lpszText) + 1;
prbbi->fMask = RBBIM_TEXT|RBBIM_COLORS;
m_wndReBar.GetReBarCtrl().SetBandInfo(i, prbbi);
strText.ReleaseBuffer();
}
// 툴바 색깔 바꾸기
CToolBarCtrl& tb = m_wndToolBar.GetToolBarCtrl();
tb.SetInsertMarkColor(RGB(128,255,128));
CBrush br2;
br2.CreateSolidBrush( RGB(128,255,128));
::SetClassLong( tb.GetSafeHwnd(), GCL_HBRBACKGROUND, (LONG)br2.Detach() );
조경민
===================================================================
CMainFrame::OnCreate 에서
int nCount = m_wndReBar.GetReBarCtrl().GetBandCount();
CString strText = "Band #:";
for (int i=0; i<nCount; i++)
{
LPREBARBANDINFO prbbi = (LPREBARBANDINFO)alloca(sizeof(REBARBANDINFO));
prbbi->cbSize = sizeof(REBARBANDINFO);
CString strText;
strText.Format("Band #: %d", i);
LPTSTR lpszText = strText.GetBuffer(strText.GetLength());
prbbi->lpText = lpszText;
prbbi->clrBack = RGB(100,100,200);
prbbi->cch = strlen(lpszText) + 1;
prbbi->fMask = RBBIM_TEXT|RBBIM_COLORS;
m_wndReBar.GetReBarCtrl().SetBandInfo(i, prbbi);
strText.ReleaseBuffer();
}
// 툴바 색깔 바꾸기
CToolBarCtrl& tb = m_wndToolBar.GetToolBarCtrl();
tb.SetInsertMarkColor(RGB(128,255,128));
CBrush br2;
br2.CreateSolidBrush( RGB(128,255,128));
::SetClassLong( tb.GetSafeHwnd(), GCL_HBRBACKGROUND, (LONG)br2.Detach() );
'KB > MFC/Win32' 카테고리의 다른 글
파레트 in MemoryDC 비트맵 (0) | 2004.03.19 |
---|---|
트리 에디트 가능하게 하기 (0) | 2004.03.19 |
윈도우 타이틀 깜빡거리게 하기 (0) | 2004.03.19 |
msword 오토메이션 예 (0) | 2004.03.19 |
ListCtrl KnowHow (0) | 2004.03.19 |