Set the itemID member of the DRAWITEMSTRUCT to the number of the

status part painted.
This commit is contained in:
Gerard Patel 2000-05-07 18:25:56 +00:00 committed by Alexandre Julliard
parent a2e1b412cf
commit d7cbd7b001
1 changed files with 8 additions and 8 deletions

View File

@ -116,7 +116,7 @@ STATUSBAR_DrawPart (HDC hdc, STATUSWINDOWPART *part)
static VOID static VOID
STATUSBAR_RefreshPart (HWND hwnd, STATUSWINDOWPART *part, HDC hdc) STATUSBAR_RefreshPart (HWND hwnd, STATUSWINDOWPART *part, HDC hdc, int itemID)
{ {
STATUSWINDOWINFO *self = STATUSBAR_GetInfoPtr (hwnd); STATUSWINDOWINFO *self = STATUSBAR_GetInfoPtr (hwnd);
HBRUSH hbrBk; HBRUSH hbrBk;
@ -137,7 +137,7 @@ STATUSBAR_RefreshPart (HWND hwnd, STATUSWINDOWPART *part, HDC hdc)
DRAWITEMSTRUCT dis; DRAWITEMSTRUCT dis;
dis.CtlID = GetWindowLongA (hwnd, GWL_ID); dis.CtlID = GetWindowLongA (hwnd, GWL_ID);
dis.itemID = -1; dis.itemID = itemID;
dis.hwndItem = hwnd; dis.hwndItem = hwnd;
dis.hDC = hdc; dis.hDC = hdc;
dis.rcItem = part->bound; dis.rcItem = part->bound;
@ -193,7 +193,7 @@ STATUSBAR_Refresh (HWND hwnd, HDC hdc)
DRAWITEMSTRUCT dis; DRAWITEMSTRUCT dis;
dis.CtlID = GetWindowLongA (hwnd, GWL_ID); dis.CtlID = GetWindowLongA (hwnd, GWL_ID);
dis.itemID = -1; dis.itemID = i;
dis.hwndItem = hwnd; dis.hwndItem = hwnd;
dis.hDC = hdc; dis.hDC = hdc;
dis.rcItem = infoPtr->parts[i].bound; dis.rcItem = infoPtr->parts[i].bound;
@ -512,12 +512,12 @@ STATUSBAR_SetIcon (HWND hwnd, WPARAM wParam, LPARAM lParam)
if (nPart == -1) { if (nPart == -1) {
self->part0.hIcon = (HICON)lParam; self->part0.hIcon = (HICON)lParam;
if (self->simple) if (self->simple)
STATUSBAR_RefreshPart (hwnd, &self->part0, hdc); STATUSBAR_RefreshPart (hwnd, &self->part0, hdc, 0);
} }
else { else {
self->parts[nPart].hIcon = (HICON)lParam; self->parts[nPart].hIcon = (HICON)lParam;
if (!(self->simple)) if (!(self->simple))
STATUSBAR_RefreshPart (hwnd, &self->parts[nPart], hdc); STATUSBAR_RefreshPart (hwnd, &self->parts[nPart], hdc, nPart);
} }
ReleaseDC (hwnd, hdc); ReleaseDC (hwnd, hdc);
@ -665,7 +665,7 @@ STATUSBAR_SetTextA (HWND hwnd, WPARAM wParam, LPARAM lParam)
part->style = style; part->style = style;
hdc = GetDC (hwnd); hdc = GetDC (hwnd);
STATUSBAR_RefreshPart (hwnd, part, hdc); STATUSBAR_RefreshPart (hwnd, part, hdc, part_num);
ReleaseDC (hwnd, hdc); ReleaseDC (hwnd, hdc);
return TRUE; return TRUE;
@ -708,7 +708,7 @@ STATUSBAR_SetTextW (HWND hwnd, WPARAM wParam, LPARAM lParam)
part->style = style; part->style = style;
hdc = GetDC (hwnd); hdc = GetDC (hwnd);
STATUSBAR_RefreshPart (hwnd, part, hdc); STATUSBAR_RefreshPart (hwnd, part, hdc, part_num);
ReleaseDC (hwnd, hdc); ReleaseDC (hwnd, hdc);
return TRUE; return TRUE;
@ -1061,7 +1061,7 @@ STATUSBAR_WMSetText (HWND hwnd, WPARAM wParam, LPARAM lParam)
} }
hdc = GetDC (hwnd); hdc = GetDC (hwnd);
STATUSBAR_RefreshPart (hwnd, part, hdc); STATUSBAR_RefreshPart (hwnd, part, hdc, 0);
ReleaseDC (hwnd, hdc); ReleaseDC (hwnd, hdc);
return TRUE; return TRUE;