Page 2 of 2

Posted: 2007-01-14, 14:36 UTC
by ghisler(Author)
Indeed I made some tests on Wine to make it work!

Posted: 2007-01-14, 23:49 UTC
by blacky
Hy Christian,

and now u now, it work on reactos 100Percent too ;)

Good work !! i can think me it was not a easy bug to find it out ...

greetings
Blacky :)

Posted: 2007-01-16, 16:56 UTC
by ghisler(Author)
Nice to hear that! Yes, it was quite time-consuming to find the reason of the problem...

Posted: 2009-09-13, 04:50 UTC
by ehab
i have a same problem with another application.

from my understand i need to refresh the display or in the case of TC reload menu bar.

Mr.ghisler or someone can you please tell me how was it solved?

Posted: 2009-09-13, 10:29 UTC
by ghisler(Author)
It was a problem with reading the icons from cache. In Tc 7.0 beta 2, I used the following code to load the monochrome (mask) bitmap:

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);
In beta 3, this was changed to:

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);

Posted: 2009-09-13, 11:50 UTC
by ehab
oky, it involves code changes. i will pass this info to the application developer with similar problems. Thank you sir.