如何修改只读编辑框的背景色和字体色?
使用WM_CTLCOLOREDIT 来设置,正常编辑框设置成功,只读的不变。。。
强制获取只读编辑框句柄,用再获取它的hdc,强制setbkcolor,failed 。。。。。
求解决之道。。 SDK
[解决办法]
TControlCanvas* cc = new TControlCanvas;
cc->Control = edt1;
RECT r = cc->Control->ClientRect;
cc->Brush->Color = clYellow;
cc->FillRect(r);
cc->Font->Color = clRed;
cc->TextOutA(1,1,edt1->Text);
delete cc;