The Windows 7 UX guide has nice illustrations and examples of icons, but I really can't find them in the SDK. Are they hiding somewhere, or are they not available ?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
If you are talking about the common UI icons, then you are supposed to get them programmatically. For instance, you can use
var
errIcon: HICON;
begin
errIcon := LoadIcon(0, IDI_ERROR);
DrawIcon(Canvas.Handle, 10, 10, errIcon),
(Delphi code) to draw an error icon.
Windows UI standard icons http://privat.rejbrand.se/uiicons.png
See LoadIcon
, DrawIcon
at MSDN. You might also wish to study STATIC
controls.
To draw other visual elements, you need to use the visual themes API, e.g. the DrawThemeBackground
function that accepts a class, part, and state and then draws it:
Chevron http://privat.rejbrand.se/chevron.png
回答2:
SHGetStockIconInfo has a decent list of system icons.