void NewGUI_ToolBarButton(void *pButton, int nBitmapIn, int nBitmapOut) { CXPStyleButtonST *p = (CXPStyleButtonST *)pButton; CString strToolTip; ASSERT(p != NULL); if(p == NULL) return; p->SetFlat(TRUE); // p->DrawTransparent(); if((nBitmapIn != -1) && (nBitmapOut != -1)) p->SetBitmaps(nBitmapIn, RGB(255,0,255), nBitmapOut, RGB(255,0,255)); p->GetWindowText(strToolTip); p->SetWindowText(_T("")); strToolTip = TRL_VAR(strToolTip); RemoveAcceleratorTip(&strToolTip); p->SetTooltipText(strToolTip); if(g_pThemeHelper == NULL) { COLORREF crHighlight; BYTE byRed, byGreen, byBlue; p->GetColor(CButtonST::BTNST_COLOR_BK_IN, &crHighlight); byRed = (BYTE)((GetRValue(crHighlight) < 240) ? GetRValue(crHighlight) + 15 : 255); byGreen = (BYTE)((GetGValue(crHighlight) < 240) ? GetGValue(crHighlight) + 15 : 255); byBlue = (BYTE)((GetBValue(crHighlight) < 240) ? GetBValue(crHighlight) + 15 : 255); crHighlight = RGB(byRed, byGreen, byBlue); p->SetColor(CButtonST::BTNST_COLOR_BK_IN, crHighlight, TRUE); } p->SetThemeHelper(g_pThemeHelper); p->DrawAsToolbar(TRUE); }
CString RemoveAcceleratorTipEx(LPCTSTR lpString) { if(lpString == NULL) return CString(); CString str = lpString; RemoveAcceleratorTip(&str); return str; }