如何修改popmenu中子菜单的颜色
当鼠标移动到popmenu菜单中的某一个选项时,该选项的颜色发生变化,应该怎么实现
[解决办法]
void __fastcall TForm1::a1DrawItem(TObject *Sender, TCanvas *ACanvas, TRect &ARect, bool Selected){ if( Selected == true ) { // ACanvas->Font->Color = clRed; SetBkColor(ACanvas->Handle,clRed); } else { // ACanvas->Font->Color = clGreen; SetBkColor(ACanvas->Handle,clGreen); } ACanvas->TextRect(ARect,0,0,a1->Caption);}