procedure TMainApp.AppendMenu(hMain: HWND);
var
Text: PWideChar;
procedure Append(
Handle: HWND; ItemShadow: integer; ItemIconPath: WideString;
ItemToolTip: PWideChar; ItemHiliteColor: COLORREF; ItemTextAlligment: TTextAlligment;
Top: integer; Flags, DlgItemID: UINT; Text: PWideChar; Enabled: BOOL = True);
begin
PopUpMenu.ItemShadow := ItemShadow;
PopUpMenu.ItemIconPath := ItemIconPath;
PopUpMenu.ItemToolTip := ItemToolTip;
PopUpMenu.ItemHiliteColor := ItemHiliteColor;
PopUpMenu.ItemTextAlligment := ItemTextAlligment;
PopUpMenu.ItemTop := Top;
PopUpMenu.ItemEnabled := Enabled;
PopUpMenu.AppendMenu(
Handle, Flags, DlgItemID, Text);
end;
begin
panBackgoundFrame := CTRL_FrameButtonCreate();
panBackgoundFrame.ImagePath := SKAERO_FOLDER + '
Frame.png';
panBackgoundFrame.Left := 9;
panBackgoundFrame.Top := 9;
panBackgoundFrame.Width := 210;
panBackgoundFrame.Height := 340;
panBackgoundFrame.DlgItemID := ID_BACKGROUNDFRAME;
panBackgoundFrame.ImageStateMax := 0;
panBackgoundFrame.Enabled := false;
panBackgoundFrame.Visible := True;
panBackgoundFrame.CreateWindow(hMain);
SKAERO_SetAnchorMode(panBackgoundFrame.Handle, ANCHOR_HEIGHT_WIDTH);
SKAERO_SetZorder(panBackgoundFrame.Handle, HWND_TOP);
// About
Append(PopUpMenu.Handle, 1, '
', '
Oops...' + CHR(13) + '
Are they in the wrong place?',
SKAERO_BTNTEXTCOLOR, Left, 9, MF_OWNERDRAW, IDM_About, '
About');
// Icon frame
Append(PopUpMenu.Handle, 1, '
', '
', SKAERO_BTNTEXTCOLOR, Left, 49, MF_OWNERDRAW, IDM_IconFrame,
'
Icon frame');
// Background layer
Append(PopUpMenu.Handle, 1, '
', '
', SKAERO_BTNTEXTCOLOR, Left, 69, MF_OWNERDRAW, IDM_IconBack,
'
Background layer');
// Change Wallpaper
Append(PopUpMenu.Handle, 1, '
', '
', SKAERO_BTNTEXTCOLOR, Left, 89, MF_OWNERDRAW, IDM_Wallpaper,
'
Change Wallpaper');
// Shortcut
if gP.ShortCutVisible
then
Text := '
Hide shor cut'
else
Text := '
Show short cut';
Append(PopUpMenu.Handle, 1, '
', '
', SKAERO_BTNTEXTCOLOR, Left, 129, MF_OWNERDRAW, IDM_ShortCut,
Text);
// Sound
if gP.SoundActive
then
Text := '
Disable sound'
else
Text := '
Enable sound';
Append(PopUpMenu.Handle, 1, '
', '
', SKAERO_BTNTEXTCOLOR, Left, 169, MF_OWNERDRAW, IDM_Sound,
Text);
// Build Config file
Append(PopUpMenu.Handle, 1, '
', '
', SKAERO_BTNTEXTCOLOR, Left, 209, MF_OWNERDRAW, IDM_BuildCONFIG,
'
Build Config file');
// Edit Config file
Append(PopUpMenu.Handle, 1, '
', '
', SKAERO_BTNTEXTCOLOR, Left, 229, MF_OWNERDRAW, IDM_Edit,
'
Edit Config file');
// Cleanup Config file
Append(PopUpMenu.Handle, 1, '
', '
', SKAERO_BTNTEXTCOLOR, Left, 249, MF_OWNERDRAW, IDM_Cleanup,
'
Cleanup Config file');
// Restart OverTheTaskBar
Append(PopUpMenu.Handle, 1, '
', '
', SKAERO_BTNTEXTCOLOR, Left, 269, MF_OWNERDRAW, IDM_Restart,
'
Restart OverTheTaskBar');
// Portable App
if gP.Portable
then
Text := '
Disable Portable App'
else
Text := '
Enable Portable App';
Append(PopUpMenu.Handle, 1, '
', '
', SKAERO_BTNTEXTCOLOR, Left, 309, MF_OWNERDRAW, IDM_PORTABLE,
Text);
// Close OverTheTaskBar
Append(PopUpMenu.Handle, 1, '
', '
', SKAERO_BTNTEXTCOLOR, Left, 329, MF_OWNERDRAW, IDM_Close,
'
Close OverTheTaskBar');
end;