I changed the button's background color but the button looks like a flat button, the focus rectangle around it is gone, so is the mouse effect when you pass mouse over it.
Below, the mouse over effect I'm talking about.
the regular button:
when mouse pass over it:
Currently the button I changed the background color look like this:
Why does it look like a flat button and how can I change that?
I thought this was going to look like this without focus:
with focus:
I'd like to change that border color too but still have the focus rectangle around it.
Here's my WM_NOTIFY:
case WM_NOTIFY:
{
LPNMHDR pnm = (LPNMHDR) lParam;
if(pnm->hwndFrom == hButton1_tab1 && pnm->code == NM_CUSTOMDRAW)
{
LRESULT res = CustomDrawButton(pnm->hwndFrom, (LPNMCUSTOMDRAW) lParam);
LPNMCUSTOMDRAW nmc = (LPNMCUSTOMDRAW) lParam;
if(nmc->dwDrawStage == CDDS_PREPAINT)
{
HDC hdc = nmc->hdc;
RECT rc = nmc->rc;
FillRect(hdc, &rc, hBrush);
return CDRF_NOTIFYITEMDRAW;
}
}
}
break;
hBrush is defined as:
hBrush = CreateSolidBrush(RGB(0, 128, 0));