Title: How to show a TMenuItem right-aligned
procedure TForm1.FormCreate(Sender: TObject);
const
MenuIndex = 3;
var
MII: TMenuItemInfo;
MainMenu: hMenu;
Buffer: array[0..50] of Char;
begin
MainMenu := GetMenu(Handle);
with MII do
begin
cbSize := SizeOf(MII);
fMask := MIIM_TYPE;
dwTypeData := Buffer;
cch := SizeOf(Buffer);
GetMenuItemInfo(MainMenu, MenuIndex, True, MII);
fType := fType or MFT_RIGHTJUSTIFY;
SetMenuItemInfo(MainMenu, MenuIndex, True, MII);
DrawMenuBar(Handle);
end;
end;