6 个解决方案
#1
在OnCtlColor中设置为透明
#2
WM_CTLCOLOR消息
#3
case WM_CREATE:
brush=CreateSolidBrush(RGB(0,255,0));
break;
case WM_CTLCOLORSTATIC:
hdc1=(HDC)wParam;
SetTextColor(hdc1,RGB(255,0,0));//这是红字绿景的
SetBkColor(hdc1,RGB(0,255,0));//情况,至于你要的情况,改为RGB(255,255,255)
return (LRESULT)brush;//记得之前声明一个HBRUSH brush;
brush=CreateSolidBrush(RGB(0,255,0));
break;
case WM_CTLCOLORSTATIC:
hdc1=(HDC)wParam;
SetTextColor(hdc1,RGB(255,0,0));//这是红字绿景的
SetBkColor(hdc1,RGB(0,255,0));//情况,至于你要的情况,改为RGB(255,255,255)
return (LRESULT)brush;//记得之前声明一个HBRUSH brush;
#4
case WM_CTLCOLORSTATIC:
SetBkColor((HDC)wParam,RGB(255,255,255));
return (LRESULT)GetStockObject(WHITE_BRUSH);
SetBkColor((HDC)wParam,RGB(255,255,255));
return (LRESULT)GetStockObject(WHITE_BRUSH);
#5
自己切割出来的视图里面VIEW类中貌似没有WM_CTLCOLORSTATIC哦~!
#6
我的是用SDK做的,你要使用MFC的话,
http://topic.csdn.net/t/20020915/16/1025369.html
这个有参考意义。
#1
在OnCtlColor中设置为透明
#2
WM_CTLCOLOR消息
#3
case WM_CREATE:
brush=CreateSolidBrush(RGB(0,255,0));
break;
case WM_CTLCOLORSTATIC:
hdc1=(HDC)wParam;
SetTextColor(hdc1,RGB(255,0,0));//这是红字绿景的
SetBkColor(hdc1,RGB(0,255,0));//情况,至于你要的情况,改为RGB(255,255,255)
return (LRESULT)brush;//记得之前声明一个HBRUSH brush;
brush=CreateSolidBrush(RGB(0,255,0));
break;
case WM_CTLCOLORSTATIC:
hdc1=(HDC)wParam;
SetTextColor(hdc1,RGB(255,0,0));//这是红字绿景的
SetBkColor(hdc1,RGB(0,255,0));//情况,至于你要的情况,改为RGB(255,255,255)
return (LRESULT)brush;//记得之前声明一个HBRUSH brush;
#4
case WM_CTLCOLORSTATIC:
SetBkColor((HDC)wParam,RGB(255,255,255));
return (LRESULT)GetStockObject(WHITE_BRUSH);
SetBkColor((HDC)wParam,RGB(255,255,255));
return (LRESULT)GetStockObject(WHITE_BRUSH);
#5
自己切割出来的视图里面VIEW类中貌似没有WM_CTLCOLORSTATIC哦~!
#6
我的是用SDK做的,你要使用MFC的话,
http://topic.csdn.net/t/20020915/16/1025369.html
这个有参考意义。