|
다른 사람 답변입니다.. 해보지는 않았지만요.. 잘 되겠죠..?
You add several to a resource file used by the program (not the default RES
file, please). But you may have something confused here: different icons and
different versions of the same icon. The Windows icon file format (which is
nothing but an isolated icon resource) allows to store several different
versions of the same icon (different size or color depth) into the same icon
file. The Delphi image editor supports this, if you create a new icon
resource the edit window you work in has a New button with which you create a
new version of the icon you are working on. The Imageeditor does not support
256 color icons, though.
All versions of an icon are part of the same resource and share a common
resource name or ID. If the icon resource is loaded via the LoadIcon API
function the icon handle resulting still refers to all versions. When it is
drawn with DrawIcon, however, a selection is made by Windows, this API
function always draws a 32*32 icon and if this resolution is not provided by
one of the versions it is produced by stretching the 16*16 version.
DrawIconEx or DrawImage allow the programmer to control what size and color
are used. If you add an icon to an imagelist the imagelist width and height
define which version is used.
If using Image Editor, simply create an icon (ie in 32x32 mode), and click
on the "New" button in the top of the MDI child containing this icon.
Choose the other size (ie 16x16 icon) and edit that. Both of these icons
can then be saved as a single .ico file. To switch from one to the other
use the combo to the left of the "new" buttoon. In your Project options,
load this icon file as the Application's icon and windows will do the rest
when it comes to which one to choose...
Image Editor doesn't support icons with colour depths higher than 16
colours, but if it did then I suspect the principle will hold that Windows
will select the most appropriate colour depth and size for you. I was a
little annoyed that Image Editor hadn't been updated for D5, but I suppose
that's what resource workshop is for...
Nick
이기주 님이 쓰신 글 :
: 실행프로그램을 만들경우 32x32아이콘은 등록할 수 있게 되어있지만
:
: 16x16아이콘도 같이 등록하는 방법이 없는것 같네요.
:
: 예전에 WIN32로 프로그래밍할때는
: WNCLASSEX에서 32x32와 16x16 아이콘을 등록하여 사용했었는데
:
: 빌더에서는 방법이 없는건지요..
:
|