comctl32: Use appropriate font for header drag image.
This commit is contained in:
parent
a4d3e46e65
commit
b7f0901956
|
@ -979,6 +979,7 @@ HEADER_CreateDragImage (HWND hwnd, WPARAM wParam)
|
||||||
HDC hMemoryDC;
|
HDC hMemoryDC;
|
||||||
HDC hDeviceDC;
|
HDC hDeviceDC;
|
||||||
int height, width;
|
int height, width;
|
||||||
|
HFONT hFont;
|
||||||
|
|
||||||
if (wParam < 0 || wParam >= infoPtr->uNumItem)
|
if (wParam < 0 || wParam >= infoPtr->uNumItem)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -996,6 +997,8 @@ HEADER_CreateDragImage (HWND hwnd, WPARAM wParam)
|
||||||
ReleaseDC(NULL, hDeviceDC);
|
ReleaseDC(NULL, hDeviceDC);
|
||||||
hOldBitmap = SelectObject(hMemoryDC, hMemory);
|
hOldBitmap = SelectObject(hMemoryDC, hMemory);
|
||||||
SetViewportOrgEx(hMemoryDC, -lpItem->rect.left, -lpItem->rect.top, NULL);
|
SetViewportOrgEx(hMemoryDC, -lpItem->rect.left, -lpItem->rect.top, NULL);
|
||||||
|
hFont = infoPtr->hFont ? infoPtr->hFont : GetStockObject(SYSTEM_FONT);
|
||||||
|
SelectObject(hMemoryDC, hFont);
|
||||||
|
|
||||||
GetClientRect(hwnd, &rc);
|
GetClientRect(hwnd, &rc);
|
||||||
lCDFlags = HEADER_SendCtrlCustomDraw(hwnd, CDDS_PREPAINT, hMemoryDC, &rc);
|
lCDFlags = HEADER_SendCtrlCustomDraw(hwnd, CDDS_PREPAINT, hMemoryDC, &rc);
|
||||||
|
|
Loading…
Reference in New Issue