Add bitmap to menu item

Posted in Components

You can use SetMenuItemBitmaps function for decision of this problem.

procedure TForm1.FormCreate(Sender: TObject);
var
  Picture: TPicture;
begin
  Picture:=TPicture.Create;
  Picture.LoadFromFile('Plus.BMP');
  SetMenuItemBitmaps(
    PopupMenu1.Handle,
    0,
    MF_BYPOSITION,
    Picture.Bitmap.Handle,
    Picture.Bitmap.Handle);
end;