如何在 PopupMenuItem 上绘制复选标记?
我试过这个:
var
iLeftPos: Integer;
iTopPos: Integer;
iText: string;
iState: integer;
iGlyphRect: TRect;
begin
iTopPos := ARect.Top + (ARect.Bottom - ARect.Top -
ACanvas.TextHeight('W')) div 2;
{ Draw checkmark }
iGlyphRect := Rect(0, iTopPos, 20, iTopPos + 20);
if Touch2.Checked then
begin
iState := iState or DFCS_MENUCHECK;
DrawFrameControl(ACanvas.handle, iGlyphRect, DFC_POPUPMENU, iState);
end;
end;
但它画了这个: