ToolStatus: Added target cursor for Find window(s) Toolbar buttons; Fixed some Statusbar part widths not being reset; Removed Statusbar tooltips; Added more consistency checking to ReBarLoadLayoutSettings;

git-svn-id: svn://svn.code.sf.net/p/processhacker/code@6262 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
dmex
2015-12-16 10:44:24 +00:00
parent da78b0392f
commit 402ea68339
3 changed files with 24 additions and 20 deletions
+6 -2
View File
@@ -724,6 +724,9 @@ static LRESULT CALLBACK MainWndSubclassProc(
// Direct all mouse events to this window.
SetCapture(hWnd);
// Set the cursor.
SetCursor(LoadCursor(NULL, IDC_CROSS));
// Send the window to the bottom.
SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
@@ -958,8 +961,6 @@ static LRESULT CALLBACK MainWndSubclassProc(
}
break;
case WM_LBUTTONUP:
case WM_RBUTTONUP:
case WM_MBUTTONUP:
{
if (TargetingWindow)
{
@@ -968,6 +969,9 @@ static LRESULT CALLBACK MainWndSubclassProc(
TargetingCompleted = TRUE;
// Reset the original cursor.
SetCursor(LoadCursor(NULL, IDC_ARROW));
// Bring the window back to the top, and preserve the Always on Top setting.
SetWindowPos(PhMainWndHandle, PhGetIntegerSetting(L"MainWindowAlwaysOnTop") ? HWND_TOPMOST : HWND_TOP,
0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
+4 -6
View File
@@ -329,9 +329,6 @@ VOID UpdateStatusBar(
{
text[count] = PhCreateString(L"-");
}
if (resetMaxWidths)
StatusBarMaxWidths[index] = 0;
}
break;
case STATUS_MAXIOPROCESS:
@@ -362,9 +359,6 @@ VOID UpdateStatusBar(
{
text[count] = PhCreateString(L"-");
}
if (resetMaxWidths)
StatusBarMaxWidths[index] = 0;
}
break;
case STATUS_VISIBLEITEMS:
@@ -459,6 +453,10 @@ VOID UpdateStatusBar(
break;
}
if (resetMaxWidths)
StatusBarMaxWidths[index] = 0;
if (!GetTextExtentPoint32(hdc, text[count]->Buffer, (ULONG)text[count]->Length / sizeof(WCHAR), &size))
size.cx = 200;
+14 -12
View File
@@ -331,7 +331,7 @@ static VOID RebarLoadSettings(
0,
STATUSCLASSNAME,
NULL,
WS_CHILD | WS_VISIBLE | CCS_BOTTOM | SBARS_SIZEGRIP | SBARS_TOOLTIPS,
WS_CHILD | WS_VISIBLE | CCS_BOTTOM | SBARS_SIZEGRIP,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
PhMainWndHandle,
NULL,
@@ -720,20 +720,22 @@ VOID ReBarLoadLayoutSettings(
PhStringToInteger64(&cxPart, 10, &cxInteger);
PhStringToInteger64(&stylePart, 10, &nStyleInteger);
bandOldIndex = (UINT)SendMessage(RebarHandle, RB_IDTOINDEX, (UINT)idInteger, 0);
if ((bandOldIndex = (UINT)SendMessage(RebarHandle, RB_IDTOINDEX, (UINT)idInteger, 0)) == -1)
break;
SendMessage(RebarHandle, RB_MOVEBAND, bandOldIndex, bandIndex);
if (SendMessage(RebarHandle, RB_MOVEBAND, bandOldIndex, bandIndex))
{
REBARBANDINFO rebarBandInfo = { REBARBANDINFO_V6_SIZE };
rebarBandInfo.fMask = RBBIM_STYLE | RBBIM_SIZE;
REBARBANDINFO rebarBandInfo = { REBARBANDINFO_V6_SIZE };
rebarBandInfo.fMask = RBBIM_STYLE | RBBIM_SIZE | RBBIM_ID;
if (SendMessage(RebarHandle, RB_GETBANDINFO, bandIndex, (LPARAM)&rebarBandInfo))
{
rebarBandInfo.cx = (UINT)cxInteger;
rebarBandInfo.fStyle |= (UINT)nStyleInteger;
SendMessage(RebarHandle, RB_GETBANDINFO, bandIndex, (LPARAM)&rebarBandInfo);
rebarBandInfo.cx = (UINT)cxInteger;
rebarBandInfo.fStyle |= (UINT)nStyleInteger;
//rebarBandInfo.fStyle = (rebarBandInfo.fStyle & ~(RBBS_HIDDEN | RBBS_BREAK)) | (UINT)nStyleInteger;
SendMessage(RebarHandle, RB_SETBANDINFO, bandIndex, (LPARAM)&rebarBandInfo);
SendMessage(RebarHandle, RB_SETBANDINFO, bandIndex, (LPARAM)&rebarBandInfo);
}
}
}
}