31 { 0, PHAPP_ID_VIEW_REFRESH, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE | BTNS_SHOWTEXT, { 0 }, 0, 0 },
32 { 1, PHAPP_ID_HACKER_OPTIONS, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE | BTNS_SHOWTEXT, { 0 }, 0, 0 },
33 { 0, 0, 0, BTNS_SEP, { 0 }, 0, 0 },
34 { 2, PHAPP_ID_HACKER_FINDHANDLESORDLLS, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE | BTNS_SHOWTEXT, { 0 }, 0, 0 },
35 { 3, PHAPP_ID_VIEW_SYSTEMINFORMATION, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE | BTNS_SHOWTEXT, { 0 }, 0, 0 },
36 { 0, 0, 0, BTNS_SEP, { 0 }, 0, 0 },
37 { 4,
TIDC_FINDWINDOW, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE | BTNS_SHOWTEXT, { 0 }, 0, 0 },
38 { 5,
TIDC_FINDWINDOWTHREAD, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE | BTNS_SHOWTEXT, { 0 }, 0, 0 },
39 { 6,
TIDC_FINDWINDOWKILL, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE | BTNS_SHOWTEXT, { 0 }, 0, 0 },
41 { 7, PHAPP_ID_VIEW_ALWAYSONTOP, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE | BTNS_SHOWTEXT, { 0 }, 0, 0 }
48 L
"Software\\ProcessHacker",
59 REBARBANDINFO rebarBandInfo = { REBARBANDINFO_V6_SIZE };
60 rebarBandInfo.fMask = RBBIM_STYLE | RBBIM_ID | RBBIM_CHILD | RBBIM_CHILDSIZE;
61 rebarBandInfo.fStyle = RBBS_NOGRIPPER | RBBS_USECHEVRON;
63 rebarBandInfo.wID = BandID;
64 rebarBandInfo.hwndChild = HwndChild;
65 rebarBandInfo.cyMinChild = cyMinChild;
66 rebarBandInfo.cxMinChild = cxMinChild;
70 rebarBandInfo.fStyle |= RBBS_FIXEDSIZE;
73 SendMessage(
RebarHandle, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rebarBandInfo);
80 INT index = (INT)SendMessage(
RebarHandle, RB_IDTOINDEX, (WPARAM)BandID, 0);
85 SendMessage(
RebarHandle, RB_DELETEBAND, (WPARAM)index, 0);
92 INT index = (INT)SendMessage(
RebarHandle, RB_IDTOINDEX, (WPARAM)BandID, 0);
100 static VOID RebarLoadSettings(
107 HBITMAP iconBitmap = NULL;
118 DeleteObject(iconBitmap);
128 DeleteObject(iconBitmap);
138 DeleteObject(iconBitmap);
148 DeleteObject(iconBitmap);
158 DeleteObject(iconBitmap);
168 DeleteObject(iconBitmap);
178 DeleteObject(iconBitmap);
188 DeleteObject(iconBitmap);
199 REBARINFO rebarInfo = {
sizeof(REBARINFO) };
206 WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CCS_NODIVIDER | CCS_TOP | RBS_VARHEIGHT | RBS_AUTOSIZE,
207 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
215 SendMessage(
RebarHandle, RB_SETBARINFO, 0, (LPARAM)&rebarInfo);
222 WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CCS_NORESIZE | CCS_NOPARENTALIGN | CCS_NODIVIDER | CCS_ADJUSTABLE | TBSTYLE_FLAT | TBSTYLE_LIST | TBSTYLE_TRANSPARENT | TBSTYLE_TOOLTIPS | TBSTYLE_AUTOSIZE,
223 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
244 SendMessage(
ToolBarHandle, TB_BUTTONSTRUCTSIZE,
sizeof(TBBUTTON), 0);
246 SendMessage(
ToolBarHandle, TB_SETEXTENDEDSTYLE, 0, TBSTYLE_EX_DOUBLEBUFFER | TBSTYLE_EX_MIXEDBUTTONS | TBSTYLE_EX_HIDECLIPPEDBUTTONS);
259 ULONG toolbarButtonSize = (ULONG)SendMessage(
ToolBarHandle, TB_GETBUTTONSIZE, 0, 0);
288 WS_CHILD | WS_VISIBLE | CCS_BOTTOM | SBARS_SIZEGRIP | SBARS_TOOLTIPS,
289 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
368 ULONG buttonCount = 0;
370 buttonCount = (ULONG)SendMessage(
ToolBarHandle, TB_BUTTONCOUNT, 0, 0);
372 for (index = 0; index < buttonCount; index++)
374 TBBUTTONINFO button = {
sizeof(TBBUTTONINFO) };
375 button.dwMask = TBIF_BYINDEX | TBIF_STYLE | TBIF_COMMAND | TBIF_STATE;
378 if (SendMessage(
ToolBarHandle, TB_GETBUTTONINFO, index, (LPARAM)&button) == -1)
382 if (button.fsStyle == BTNS_SEP)
388 button.dwMask |= TBIF_TEXT;
392 if (button.idCommand == PHAPP_ID_VIEW_ALWAYSONTOP)
397 button.fsState |= TBSTATE_PRESSED;
404 button.fsStyle = BTNS_BUTTON | BTNS_AUTOSIZE;
408 switch (button.idCommand)
410 case PHAPP_ID_VIEW_REFRESH:
411 case PHAPP_ID_HACKER_OPTIONS:
412 case PHAPP_ID_HACKER_FINDHANDLESORDLLS:
413 case PHAPP_ID_VIEW_SYSTEMINFORMATION:
414 button.fsStyle = BTNS_BUTTON | BTNS_AUTOSIZE | BTNS_SHOWTEXT;
417 button.fsStyle = BTNS_BUTTON | BTNS_AUTOSIZE;
423 button.fsStyle = BTNS_BUTTON | BTNS_AUTOSIZE | BTNS_SHOWTEXT;
428 SendMessage(
ToolBarHandle, TB_SETBUTTONINFO, index, (LPARAM)&button);
439 REBARBANDINFO rebarBandInfo = { REBARBANDINFO_V6_SIZE };
440 rebarBandInfo.fMask = RBBIM_IDEALSIZE;
445 if (SendMessage(
RebarHandle, RB_GETBANDINFO, index, (LPARAM)&rebarBandInfo) != -1)
452 rebarBandInfo.cxIdeal = idealWidth.cx;
454 SendMessage(
RebarHandle, RB_SETBANDINFO, index, (LPARAM)&rebarBandInfo);
467 INT buttonCount = (INT)SendMessage(
ToolBarHandle, TB_BUTTONCOUNT, 0, 0);
468 while (buttonCount--)
469 SendMessage(
ToolBarHandle, TB_DELETEBUTTON, (WPARAM)buttonCount, 0);
482 case PHAPP_ID_VIEW_REFRESH:
484 case PHAPP_ID_HACKER_OPTIONS:
486 case PHAPP_ID_HACKER_FINDHANDLESORDLLS:
487 return L
"Find Handles or DLLs";
488 case PHAPP_ID_VIEW_SYSTEMINFORMATION:
489 return L
"System Information";
491 return L
"Find Window";
493 return L
"Find Window and Thread";
495 return L
"Find Window and Kill";
496 case PHAPP_ID_VIEW_ALWAYSONTOP:
497 return L
"Always on Top";