Search Results for '프로그래밍/Visual Studio'


1 POSTS

  1. 2009/01/21 CSplitterWnd Splitter bar 색상변경 by philosup
창을 나누면 창과 창사이에 크기를 조절하는 Splitter bar가 존재한다.
이 바의 색 및 두께를 조절하기 위해선 상속을 받아서 처리하면 된다.

OnDrawSplitter(CDC* pDC, ESplitType nType, const CRect& rectArg)
함수를 오버라이딩하여 사용하면 되고
간단한 색 조절 코드
 if((nType != splitBar) || (pDC == NULL))
 {
  CSplitterWnd::OnDrawSplitter(pDC, nType, rectArg);
  return;
 }
 ASSERT_VALID(pDC);
 CBrush brush;
 brush.CreateSolidBrush(RGB(1,68,122));
 pDC->FillRect(&rectArg, &brush);

ESplitType은 다음과 같이 정의 되어 있다.
 enum ESplitType { splitBox, splitBar, splitIntersection, splitBorder };

MSDN을 찾아보면 아래와 같다. 위 예제 코드를 보면서 응용하면 되것다.

A value of the enum ESplitType, which can be one of the following:

  • splitBox   The splitter drag box.

  • splitBar   The bar that appears between the two split windows.

  • splitIntersection The intersection of the split windows. This element will not be called when running on Windows 95/98.

  • splitBorder   The split window borders.


추가로 아래와 같은 변수 값의 조절로 Splitter bar의 크기및 모양을 조절할 수 있다.
m_cxSplitter,  m_cySplitter
m_cxBorderShare, m_cyBorderShare
m_cxSplitterGap, m_cySplitterGap
m_cxBorder, m_cyBorder

Posted by philosup

2009/01/21 14:14 2009/01/21 14:14


Calendar

«   2010/09   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30