케이피's 불량블로그!

블로그 이미지

케이피

OOP, Debugging... 인생의 숙제들..... [블로그의 글을 맹신하면 곤란]

note

잡다한 정보들(기타정보) 2008. 5. 20. 01:20

4/25
 # "The view window is a child of the frame window"

 # 상태바
SetPaneText(int nIndex, LPCTSTR lpszNewText, BOOL bUpdate=TRUE);
MainFrame 포인터를 얻어 SetPaneText 때려야한다.
int idex = CommandToIndex(ID);  // 해당 페인 번호를 리턴

CMainFrame* pMfrm = (CMainFrame*)AfxGetApp()->m_pMainWnd; pDoc = (CMyAddressBookDoc*)pMfrm->GetActiveView()->GetDocument();


# 상태바 크기 조절... 은근히 쉽지 않은걸? ㅠ_ㅠ 구현 실패다...
String 길이에 따라 조절?
m_wndStatusBar.GetStatusBarCtrl().SetParts();

const int nParts = 4;
CRect rect;
m_wndStatusBarCtrl.GetClientRect(&rect);
int widths[nParts] = { rect.right-300, rect.right-200, rect.right-100, -1 };
VERIFY( m_wndStatusBarCtrl.SetParts(nParts, widths) );


# "윈도에는 어떤 자식 윈도든 삽입할 수 있다."


CListCtrl& listCtrl = GetListCtrl();
while((nItem = listCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1)

# 한줄마다 다른 색을 넣기 위해...   Custom Draw를 써야한다...
 http://www.codeproject.com/listctrl/lvcustomdraw.asp         
ON_NOTIFY_REFLECT ( NM_CUSTOMDRAW, OnCustomdraw )

afx_msg void OnCustomdraw ( NMHDR* pNMHDR, LRESULT* pResult );

void CMyDlg::OnCustomdraw ( NMHDR* pNMHDR, LRESULT* pResult )
{
NMLVCUSTOMDRAW* pLVCD = reinterpret_cast( pNMHDR );

    // Take the default processing unless we set this to something else below.
    *pResult = CDRF_DODEFAULT;

    // First thing - check the draw stage. If it's the control's prepaint
    // stage, then tell Windows we want messages for every item.

    if ( CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage )
        {
        *pResult = CDRF_NOTIFYITEMDRAW;
        }
    else if ( CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage )
        {
        // This is the prepaint stage for an item. Here's where we set the
        // item's text color. Our return value will tell Windows to draw the
        // item itself, but it will use the new color we set here.
        // We'll cycle the colors through red, green, and light blue.

        COLORREF crText;

        if ( (pLVCD->nmcd.dwItemSpec % 3) == 0 )
            crText = RGB(255,0,0);
        else if ( (pLVCD->nmcd.dwItemSpec % 3) == 1 )
            crText = RGB(0,255,0);
        else
            crText = RGB(128,128,255);

        // Store the color back in the NMLVCUSTOMDRAW struct.
        pLVCD->clrText = crText;

        // Tell Windows to paint the control itself.

        // pLVCD->iSubItem is column value made by zero-based
        *pResult = CDRF_DODEFAULT;
        }
}


Posted by 케이피
블로그 이미지

OOP, Debugging... 인생의 숙제들..... [블로그의 글을 맹신하면 곤란]

by 케이피

공지사항

    최근...

  • 포스트
  • 댓글
  • 트랙백
  • 더 보기

태그

  • DLL
  • c#
  • 객체지향
  • activex
  • 안드로이드
  • bug
  • Automation
  • Mentor
  • vs2008
  • debugging
  • IME
  • trace
  • Emma Stone
  • excel
  • CString
  • 최강 볼걸
  • LPCSTR
  • OOP
  • CView
  • dbgView
  • SmartClient
  • 최적화?
  • MFC Tip
  • 8강전
  • 엠마스톤
  • CNN
  • 유로2008 일정
  • MFC
  • XML
  • JAVA 맛보기

글 보관함

«   2025/06   »
일 월 화 수 목 금 토
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

링크

카테고리

전체보기 (98)
Qt의 오묘함 (1)
영양가없는이야기(개인사) (1)
주체못할파괴본능(디버그) (5)
넌왜C++을C처럼쓰냐?(OOP) (2)
잡다한 정보들(기타정보) (53)
귀찮아...(유용링크) (13)
참 잼난다(취미) (6)
JAVA 의 향기~(자바) (2)
코딩을부탁해(Rapid Coding) (0)
베스트똘추짓(개고생리스트) (11)
매운핫소스(허접소스) (1)

카운터

Total
Today
Yesterday
방명록 : 관리자 : 글쓰기
케이피's Blog is powered by daumkakao
Skin info material T Mark3 by 뭐하라
favicon

케이피's 불량블로그!

OOP, Debugging... 인생의 숙제들..... [블로그의 글을 맹신하면 곤란]

  • 태그
  • 링크 추가
  • 방명록

관리자 메뉴

  • 관리자 모드
  • 글쓰기
  • 전체보기 (98)
    • Qt의 오묘함 (1)
    • 영양가없는이야기(개인사) (1)
    • 주체못할파괴본능(디버그) (5)
    • 넌왜C++을C처럼쓰냐?(OOP) (2)
    • 잡다한 정보들(기타정보) (53)
    • 귀찮아...(유용링크) (13)
    • 참 잼난다(취미) (6)
    • JAVA 의 향기~(자바) (2)
    • 코딩을부탁해(Rapid Coding) (0)
    • 베스트똘추짓(개고생리스트) (11)
    • 매운핫소스(허접소스) (1)

카테고리

PC화면 보기 티스토리 Daum

티스토리툴바