[英]What format are the images in the delphi IDE menu?
我在Delphi IDE(Delphi 2007)的主菜單中添加了一個新條目,並將bmp圖像添加到與菜單關聯的圖像列表中(不將掩碼作為參數傳遞)
IDEMainMenu.Images.Add(Image,nil);
但添加的圖像沒有顯示透明色,我嘗試使用8和24位bmp並使用fucsia作為背景顏色,但ide始終顯示帶背景的圖標。 所以問題是which is the color depth of the bmp images which i must use and the color of the backgrpund to make appear the image transparent in the delphi ide menu?
或者我需要將掩碼bmp傳遞給Images.Add
函數?
嘗試使用圖標格式(.ico),尺寸為16x16和256色。
這是我使用的代碼, MainMenu
是IDE菜單項的實例。
Image:=TIcon.Create;
try
Image.Handle := LoadIcon(hInstance, sLogo16);
ExplorerItem.ImageIndex:=MainMenu.Images.AddIcon(Image);
finally
Image.Free;
end;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.