OpenGL Super Bible! Page 421 (X web hosting) busy = LoadCursor(NULL,
OpenGL Super Bible! Page 421 busy = LoadCursor(NULL, IDC_WAIT); oldcursor = SetCursor(busy); SetMapMode(pd.hDC, MM_TEXT); di.cbSize = sizeof(DOCINFO); di.lpszDocName = “OpenGL Image”; di.lpszOutput = NULL; StartDoc(pd.hDC, &di); StartPage(pd.hDC); /* * Clear the background to white */ rect.top = 0; rect.left = 0; rect.right = GetDeviceCaps(pd.hDC, HORZRES); rect.bottom = GetDeviceCaps(pd.hDC, VERTRES); brush = CreateSolidBrush(0×00ffffff); FillRect(pd.hDC, &rect, brush); /* * Stretch the bitmap to fit the page */ hdc = CreateCompatibleDC(pd.hDC); bitmap = CreateDIBitmap(hdc, &(info->bmiHeader), CBM_INIT, bits, info, DIB_RGB_COLORS); SelectObject(hdc, bitmap); xsize = rect.right; ysize = xsize * info->bmiHeader.biHeight / info- >bmiHeader.biWidth; if (ysize > rect.bottom) { ysize = rect.bottom; xsize = ysize * info->bmiHeader.biWidth / info- >bmiHeader.biHeight; }; xoffset = (rect.right - xsize) / 2; yoffset = (rect.bottom - ysize) / 2; StretchBlt(pd.hDC, xoffset, yoffset, xsize, ysize, hdc, 0, 0, info- >bmiHeader.biWidth, info->bmiHeader.biHeight, SRCCOPY); /* * That’s it. End the print job and free anything we allocated */ EndPage(pd.hDC); EndDoc(pd.hDC); DeleteDC(pd.hDC);
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.