I need to fill some regions of the channel of a trackbar with different colors, but if the slider (most of its area) is located in such a region, the color of the area of the slider that overlaps the region will also change, which makes the slider almost invisible. How can I avoid this?
My code is as follows:
RECT channelRect, rectToFill;
SendDlgItemMessage(hDlg, IDC_SLIDER1, TBM_GETCHANNELRECT, 0, (LPARAM)&channelRect);
rectToFill = channelRect;
rectToFill.right = (channelRect.left+channelRect.right)/2; // Fill the left half of the channel
HDC hdc = GetDC(GetDlgItem(hDlg, IDC_SLIDER1));
FillRect(hdc, &rectToFill, (HBRUSH) (COLOR_WINDOW+1));
Aucun commentaire:
Enregistrer un commentaire