Posted: 2007-01-14, 14:36 UTC
Indeed I made some tests on Wine to make it work!
Forum - Public Discussion and Support
https://www.ghisler.ch/board/
Code: Select all
iconinfo.hbmMask:=CreateBitmap(pbih.biWidth,
pbih.biHeight,
pbih.biPlanes,
pbih.biBitCount,nil);
SetDIBits(dc,iconinfo.hbmMask,0, pbih.biHeight,
pchar(pbmi)+sizeof(tBITMAPINFOHEADER)+ pbih.biClrUsed*sizeof(tRGBQUAD),
pbmi^, DIB_RGB_COLORS);
Code: Select all
//Convert mono bits from dword-alligned bottom-up to word-aligned top-down!
bytewidth2:=((pbih.biWidth+15) and not 15) div 8; {word-alligned!}
monobitsize:=bytewidth2*pbih.biHeight;
getmem(monobits,monobitsize);
ptr0:=pchar(pbmi)+sizeof(tBITMAPINFOHEADER)+ pbih.biClrUsed*sizeof(tRGBQUAD);
for j:=0 to pbih.biHeight-1 do
move(ptr0[j*bytewidth],monobits[(pbih.biHeight-j-1)*bytewidth2],bytewidth2);
iconinfo.hbmMask:=CreateBitmap(pbih.biWidth,
pbih.biHeight,
pbih.biPlanes,
pbih.biBitCount,monobits);
freemem(monobits,monobitsize);