46 subMenu = GetSubMenu(menu, 0);
93 CheckMenuItem(subMenu,
id, MF_CHECKED);
97 id = (ULONG)TrackPopupMenu(
99 TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RIGHTBUTTON | TPM_NONOTIFY | TPM_RETURNCMD,
161 static ULONG lastTickCount = 0;
170 BOOLEAN resetMaxWidths =
FALSE;
187 SelectObject(hdc, (HFONT)SendMessage(
StatusBarHandle, WM_GETFONT, 0, 0));
193 tickCount = GetTickCount();
195 if (tickCount - lastTickCount >= 10000)
197 resetMaxWidths =
TRUE;
198 lastTickCount = tickCount;
218 L
"CPU Usage: %.2f%%",
226 L
"Commit Charge: %.2f%%",
234 L
"Physical Memory: %.2f%%",
309 StatusBarMaxWidths[index] = 0;
342 StatusBarMaxWidths[index] = 0;
347 HWND tnHandle = NULL;
353 ULONG visibleCount = 0;
372 HWND tnHandle = NULL;
378 ULONG visibleCount = 0;
379 ULONG selectedCount = 0;
383 for (ULONG i = 0; i < visibleCount; i++)
404 if (!GetTextExtentPoint32(hdc, text[count]->Buffer, (ULONG)text[count]->Length / 2, &size))
408 widths[count] = widths[count - 1];
412 width = size.cx + 10;
414 if (width <= StatusBarMaxWidths[index])
415 width = StatusBarMaxWidths[index];
417 StatusBarMaxWidths[index] = width;
419 widths[count] += width;
425 StatusBarMaxWidths[index] = 0;
435 for (i = 0; i < count; i++)