comctl32: Make the position variables signed to avoid wrapping in the HDF_RIGHT case.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6920cf68e6
commit
23dbdab4fe
|
@ -406,11 +406,12 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU
|
||||||
|
|
||||||
/* Now text and image */
|
/* Now text and image */
|
||||||
{
|
{
|
||||||
UINT rw, rh, /* width and height of r */
|
INT rw, rh; /* width and height of r */
|
||||||
*x = NULL, *w = NULL; /* x and width of the pic (bmp or img) which is part of cnt */
|
INT *x = NULL; /* x and ... */
|
||||||
|
UINT *w = NULL; /* ... width of the pic (bmp or img) which is part of cnt */
|
||||||
/* cnt,txt,img,bmp */
|
/* cnt,txt,img,bmp */
|
||||||
UINT cx, tx, ix, bx,
|
INT cx, tx, ix, bx;
|
||||||
cw, tw, iw, bw;
|
UINT cw, tw, iw, bw;
|
||||||
INT img_cx, img_cy;
|
INT img_cx, img_cy;
|
||||||
BITMAP bmp;
|
BITMAP bmp;
|
||||||
|
|
||||||
|
@ -501,14 +502,14 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU
|
||||||
if (bw) {
|
if (bw) {
|
||||||
HDC hdcBitmap = CreateCompatibleDC (hClipDC);
|
HDC hdcBitmap = CreateCompatibleDC (hClipDC);
|
||||||
SelectObject (hdcBitmap, phdi->hbm);
|
SelectObject (hdcBitmap, phdi->hbm);
|
||||||
BitBlt (hClipDC, bx, r.top + ((INT)rh - bmp.bmHeight) / 2,
|
BitBlt (hClipDC, bx, r.top + (rh - bmp.bmHeight) / 2,
|
||||||
bmp.bmWidth, bmp.bmHeight, hdcBitmap, 0, 0, SRCCOPY);
|
bmp.bmWidth, bmp.bmHeight, hdcBitmap, 0, 0, SRCCOPY);
|
||||||
DeleteDC (hdcBitmap);
|
DeleteDC (hdcBitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iw) {
|
if (iw) {
|
||||||
ImageList_DrawEx (infoPtr->himl, phdi->iImage, hClipDC,
|
ImageList_DrawEx (infoPtr->himl, phdi->iImage, hClipDC,
|
||||||
ix, r.top + ((INT)rh - img_cy) / 2,
|
ix, r.top + (rh - img_cy) / 2,
|
||||||
img_cx, img_cy, CLR_DEFAULT, CLR_DEFAULT, 0);
|
img_cx, img_cy, CLR_DEFAULT, CLR_DEFAULT, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue