With the oldest OSs the editor suffer of some problems or memory leaks:
- Windows 95 miss msimg32.dll, it can be taken from Win98 and it contains TransparentBlt for the transparence on texts. Only Palette and Tileset works.
- Windows 98, memory leak when I use SelectObject(tempDC, objecToUse). Only Palette and Tileset works.
- Windows NT 4.0, miss msimg32.dll (if I take it from Win98 there are memory leaks from TransparentBlt), take A LOT of RAM (about 100MB) but the editor works and it's fast as NT 5.1/6.x
case WM_PAINT:
{
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hWnd, &ps);
HDC hBack = CreateCompatibleDC(hdc);
HBITMAP hBmpBack = CreateCompatibleBitmap(hdc, ps.rcPaint.right, ps.rcPaint.bottom);
SelectObject(hBack, hBmpBack); // <== Memory leak on Win9x
// Some stuff
BitBlt(hdc, 0, 0, ps.rcPaint.right, ps.rcPaint.bottom, hBack, 0, 0, SRCCOPY);
DeleteObject(hBmpBack);
DeleteDC(hBack);
EndPaint(hWnd, &ps);
}
break;
If someone know how to fix it please reply.
Nessun commento:
Posta un commento