我尝试执行以下操作,但没有显示框架/边框。我尝试了 FrameRect 和 Rectangle。任何想法,为什么这不起作用?
case WM_CTLCOLOREDIT:
{
HDC hdC = (HDC)wParam;
SetTextColor( hdC, RGB(112,112,112) );
SetBkMode( hdC, TRANSPARENT );
RECT rect;
GetClientRect( (HWND)lParam, &rect );
HBRUSH hBrush = CreateSolidBrush( RGB(209,209,209) );
//FrameRect( hdC, &rect, hBrush );
Rectangle( hdC, (int)rect.left, (int)rect.top, (int)rect.right, (int)rect.bottom );
DeleteObject( hBrush );
LOGBRUSH lb;
lb.lbStyle = BS_SOLID;
lb.lbColor = RGB(249,249,249);
lb.lbHatch = 0;
return (LRESULT)CreateBrushIndirect(&lb);
}
break;