| 1256 | } |
| 1257 | |
| 1258 | void DrawErrorBox(HDC hdc, RECT rect) |
| 1259 | { |
| 1260 | ri::DrawEdge(hdc, &rect, BDR_SUNKEN, BF_RECT); |
| 1261 | |
| 1262 | HRGN rgn = CreateRectRgnIndirect(&rect); |
| 1263 | SelectClipRgn(hdc, rgn); |
| 1264 | |
| 1265 | int smcxsmicon = GetSystemMetrics(SM_CXSMICON); |
| 1266 | int x = rect.left + (rect.right - rect.left - smcxsmicon) / 2; |
| 1267 | int y = rect.top + (rect.bottom - rect.top - smcxsmicon) / 2; |
| 1268 | ri::DrawIconEx(hdc, x, y, g_ImgErrorIcon, smcxsmicon, smcxsmicon, 0, NULL, DI_COMPAT | DI_NORMAL); |
| 1269 | |
| 1270 | SelectClipRgn(hdc, NULL); |
| 1271 | DeleteRgn(rgn); |
| 1272 | } |
| 1273 | |
| 1274 | bool GetDataFromBitmap(HDC hdc, HBITMAP hbm, BYTE*& pBytes, int& width, int& height, int& bpp) |
| 1275 | { |