첨에 그냥 암 생각없이 했다가 16칼라로만 나와서 황당했다.
오랜시간 삽질끝에 알아냄-_-
ImageList_LoadBitmap 매크로대신 ImageList_LoadImage 를 써주고...
imagelst = ImageList_LoadImage(hInst, MAKEINTRESOURCE(IDB_STATUSICON), 16, 1, RGB(0, 255, 0), IMAGE_BITMAP, LR_CREATEDIBSECTION);
SendMessage(hTreeview, TVM_SETIMAGELIST, (WPARAM)TVSIL_NORMAL, (LPARAM)imagelst);
이렇게만 해주면 바로 원하는 색상으로 나음
ImageList_Create 를 사용할 경우에는
세번째 인자(flags)를
ILC_COLOR, ILC_COLOR4, ILC_COLOR8, ILC_COLOR16, ILC_COLOR24 등등을 넣어줌
아래는 그 인자에 대한 내용. 아싸 좋네.
ILC_COLOR Use the default behavior if none of the other ILC_COLOR* flags is specified. Typically, the default is ILC_COLOR4, but for older display drivers, the default is ILC_COLORDDB.
ILC_COLOR4 Use a 4-bit (16-color) device-independent bitmap (DIB) section as the bitmap for the image list.
ILC_COLOR8 Use an 8-bit DIB section. The colors used for the color table are the same colors as the halftone palette.
ILC_COLOR16 Use a 16-bit (32/64k-color) DIB section.
ILC_COLOR24 Use a 24-bit DIB section.
ILC_COLOR32 Use a 32-bit DIB section.
ILC_COLORDDB Use a device-dependent bitmap.
ILC_MASK Use a mask. The image list contains two bitmaps, one of which is a monochrome bitmap used as a mask. If this value is not included, the image list contains only one bitmap.
ILC_MIRROR Version 6.00. Microsoft® Windows® can be mirrored to display languages such as Hebrew or Arabic that read right-to-left. If the image list is created on a mirrored version of Windows, then the images in the lists are mirrored, that is, they are flipped so they display from right to left. Use this flag on a mirrored version of Windows to instruct the image list not to automatically mirror images.
ILC_PERITEMMIRROR Version 6.00. Specify this flag if ILC_MIRROR is used on an image list that contains a strip of images. In order for this flag to have any effect, ILC_MIRROR must also be specified.
- 영양가 있는 포스팅인가요
-
(총 2분이 투표해서 4.0점)
4.0점
Trackback Address :: http://hooriza.com/trackback/108