mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-04 08:30:51 +00:00
improve
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@358 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -417,21 +417,16 @@ void MwLLDrawPixmap(MwLL handle, MwRect* rect, MwLLPixmap pixmap) {
|
|||||||
void MwLLSetIcon(MwLL handle, MwLLPixmap pixmap) {
|
void MwLLSetIcon(MwLL handle, MwLLPixmap pixmap) {
|
||||||
ICONINFO ii;
|
ICONINFO ii;
|
||||||
HICON ico;
|
HICON ico;
|
||||||
HBITMAP mask;
|
|
||||||
|
|
||||||
mask = CreateBitmap(pixmap->width, pixmap->height, 1, 1, NULL);
|
|
||||||
|
|
||||||
memset(&ii, 0, sizeof(ii));
|
memset(&ii, 0, sizeof(ii));
|
||||||
ii.fIcon = TRUE;
|
ii.fIcon = TRUE;
|
||||||
ii.xHotspot = 0;
|
ii.xHotspot = 0;
|
||||||
ii.yHotspot = 0;
|
ii.yHotspot = 0;
|
||||||
ii.hbmMask = mask;
|
ii.hbmMask = pixmap->hMask;
|
||||||
ii.hbmColor = pixmap->hBitmap;
|
ii.hbmColor = pixmap->hBitmap;
|
||||||
|
|
||||||
ico = CreateIconIndirect(&ii);
|
ico = CreateIconIndirect(&ii);
|
||||||
|
|
||||||
DeleteObject(mask);
|
|
||||||
|
|
||||||
SetClassLongPtr(handle->hWnd, GCLP_HICON, (LPARAM)ico);
|
SetClassLongPtr(handle->hWnd, GCLP_HICON, (LPARAM)ico);
|
||||||
|
|
||||||
DestroyIcon(ico);
|
DestroyIcon(ico);
|
||||||
|
|||||||
Reference in New Issue
Block a user