Is it possible to custom_draw the chevron button on the CRebar?
-
I want to customize the rebar's appearance(gripper, background...).I catch the NM_CUSTOMDRAW notification to do some processing, For example: BOOL CMyReBar::OnNotify( WPARAM wParam, LPARAM lParam, LRESULT* pResult ) { ......... NMHDR* pNMHDR = ( NMHDR* )lParam; switch ( pNMHDR->code ) { case NM_CUSTOMDRAW: { //DWORD dwStyle = GetDrawStyle(); //if (dwStyle>DRAW_ORIGINAL) *pResult=DoCustomDrawXP(pNMHDR); break; } ........... } ........ } LRESULT CMyReBar::DoCustomDrawXP( NMHDR* pNMHDR) { LPNMCUSTOMDRAW lpNMCustomDraw = ( LPNMCUSTOMDRAW )pNMHDR; LRESULT pResult = CDRF_DODEFAULT; switch ( lpNMCustomDraw->dwDrawStage ) { case CDDS_PREPAINT: pResult = CDRF_NOTIFYITEMDRAW; break; case CDDS_ITEMPREPAINT: //here I try to owner-draw the rebar control's appearance DrawItem(lpNMCustomDraw); pResult = CDRF_SKIPDEFAULT; break; } return pResult; } But I find in this way I can only custom-draw the gripper. If there is a chevron button on the rebar, it is disappeared. How could I get the similar notification to draw the chevron button by myself?
Thanks Benben