首先自己做一副图,在上面写上自己要在菜单上显示的东东,然后用Delphi制作菜单,这些我
就不说了很简单的,然后参照下面的代码就行了.
procedure TfrmMain.mnuShowMainMeasureItem(Sender: TObject;
ACanvas: TCanvas; var Width, Height: Integer);
begin
Height:=18;
Width:=140;
ACanvas.Brush.Color:=clBlue;
ACanvas.TextOut(0,10,TMenuitem(Sender).Caption);
end;
procedure TfrmMain.mnuShowMainDrawItem(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; Selected: Boolean);
begin
acanvas.Draw(0,0,image1.picture.bitmap);
acanvas.TextOut(arect.left+image1.picture.bitmap.width+12,arect.top,tmenuitem(sender).caption);
end;
如果有什么不清楚的,我可以给你发源代码,自己摸索一下吧!有事给我写信,我的邮箱:
rake1998@371.net我上大富翁很难.