if(saveDiagFlag) { \r
BITMAP b; int i, j=0, m, w, wb, fac=0; char *pData; \r
BITMAPINFOHEADER bih; int color[16], nrColors=0;\r
+ HBITMAP src = bufferBitmap, obmp; HDC tmp = CreateCompatibleDC(hdc);\r
\r
+ bufferBitmap = CreateCompatibleBitmap(hdc, boardRect.right-boardRect.left, Rect.bottom-Rect.top-2*OUTER_MARGIN);\r
+ obmp = SelectObject(tmp, bufferBitmap);\r
+ BitBlt(tmp, 0, 0, boardRect.right - boardRect.left, Rect.bottom - Rect.top - 2*OUTER_MARGIN,\r
+ tmphdc, boardRect.left, OUTER_MARGIN, SRCCOPY);\r
GetObject(bufferBitmap, sizeof(b), &b);\r
if(pData = malloc(b.bmWidthBytes*b.bmHeight + 10000)) {\r
bih.biSize = sizeof(BITMAPINFOHEADER);\r
fputc(pData[i], diagFile);\r
free(pData);\r
}\r
+ DeleteObject(bufferBitmap); bufferBitmap = src;\r
+ SelectObject(tmp, obmp);\r
+ DeleteDC(tmp);\r
}\r
\r
SelectObject(tmphdc, oldBitmap);\r