88 UINT HintId = DefHintId;
90 LastHint = HintArray + HintsCount;
91 while (HintArray != LastHint)
93 if (HintArray->
CmdId == CmdId)
95 HintId = HintArray->
HintId;
132 WCHAR szNumServices[32];
174 if (
Info->bIsUserAnAdmin)
182 Flags =
Info->pCurrentService->ServiceStatusProcess.dwControlsAccepted;
183 State =
Info->pCurrentService->ServiceStatusProcess.dwCurrentState;
245 WCHAR Item1[256], Item2[256];
250 return wcscmp(Item1, Item2) *
Info->SortDirection;
287 if (hImageList ==
NULL)
309 INT StatWidths[] = {130, -1};
325 sizeof(StatWidths) /
sizeof(
INT),
355 if (
Info->bIsUserAnAdmin)
454 sizeof(Buf) /
sizeof(
WCHAR));
466 Info->pCurrentService->lpServiceName,
467 Info->pCurrentService->lpDisplayName,
481 Info->pCurrentService->lpServiceName,
482 Info->pCurrentService->lpDisplayName,
495 Info->pCurrentService->lpServiceName,
496 Info->pCurrentService->lpDisplayName,
508 Info->pCurrentService->lpServiceName,
509 Info->pCurrentService->lpDisplayName,
521 Info->pCurrentService->lpServiceName,
522 Info->pCurrentService->lpDisplayName,
534 L"Help is not yet implemented\n",
609 RECT rcClient, rcTool, rcStatus;
610 int lvHeight, iToolHeight, iStatusHeight;
615 iToolHeight = rcTool.
bottom - rcTool.
top;
620 iStatusHeight = rcStatus.
bottom - rcStatus.
top;
624 lvHeight = rcClient.
bottom - iToolHeight - iStatusHeight;
649 goto HandleDefaultMessage;
692 switch (pnmhdr->
code)
736 Info->SortDirection = hdi.lParam;
770 idButton = (
UINT)lpttt->hdr.idFrom;
844 goto HandleDefaultMessage;
904 HandleDefaultMessage:
932 Info->nCmdShow = nCmdShow;
static const MENU_HINT SystemMenuHintTable[]
static const WCHAR szMainWndClass[]
VOID OpenPropSheet(PMAIN_WND_INFO Info)
#define TB_BUTTONSTRUCTSIZE
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
INT_PTR CALLBACK DeleteDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
static BOOL CreateStatusBar(PMAIN_WND_INFO Info)
#define TBSTYLE_EX_HIDECLIPPEDBUTTONS
#define IDS_TOOLTIP_DELETE
#define TBSTATE_INDETERMINATE
VOID UpdateServiceCount(PMAIN_WND_INFO Info)
#define UNREFERENCED_PARAMETER(P)
VOID ListViewSelectionChanged(PMAIN_WND_INFO Info, LPNMLISTVIEW pnmv)
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
#define ListView_GetItemText(hwndLV, i, iSubItem_, pszText_, cchTextMax_)
static VOID UpdateMainStatusBar(PMAIN_WND_INFO Info)
BOOL RunActionWithProgress(HWND hParent, LPWSTR ServiceName, LPWSTR DisplayName, UINT Action, PVOID Param)
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
#define SERVICE_ACCEPT_STOP
static BOOL MainWndMenuHint(PMAIN_WND_INFO Info, WORD CmdId, const MENU_HINT *HintArray, DWORD HintsCount, UINT DefHintId)
HWND WINAPI SetFocus(_In_opt_ HWND)
static BOOL InitMainWnd(PMAIN_WND_INFO Info)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
static INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
BOOL WINAPI DestroyWindow(_In_ HWND)
static const MENU_HINT MainMenuHintTable[]
#define IDS_HINT_SYS_MINIMIZE
struct tagNMHDR * LPNMHDR
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
#define IDS_TOOLTIP_CREATE
_Must_inspect_result_ _In_ ULONG Flags
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define Header_GetItem(hwndHD, i, phdi)
_Out_opt_ int _Out_opt_ int * cy
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
static VOID CALLBACK MainWndResize(PMAIN_WND_INFO Info, WORD cx, WORD cy)
#define ListView_Arrange(hwndLV, code)
#define ListView_GetItemCount(hwnd)
static INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
#define SERVICE_ACCEPT_PAUSE_CONTINUE
#define IDS_TOOLTIP_RESTART
#define IDS_HINT_SYS_MOVE
static BOOL pCreateToolbar(PMAIN_WND_INFO Info)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
#define IDS_TOOLTIP_REFRESH
struct _MAIN_WND_INFO * PMAIN_WND_INFO
int WINAPI GetSystemMetrics(_In_ int)
#define IDS_HINT_SYS_RESTORE
BOOL RefreshServiceList(PMAIN_WND_INFO Info)
VOID UninitMainWindowImpl(VOID)
VOID ExportFile(PMAIN_WND_INFO Info)
#define IDS_HINT_SYS_SIZE
#define MB_ICONINFORMATION
static LRESULT CALLBACK MainWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
LPQUERY_SERVICE_CONFIG GetServiceConfig(LPWSTR lpServiceName)
HIMAGELIST InitImageList(UINT StartResource, UINT EndResource, UINT Width, UINT Height, ULONG type)
#define IDS_TOOLTIP_PAUSE
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
VOID DisplayString(LPWSTR Msg)
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
VOID ChangeListViewText(PMAIN_WND_INFO Info, ENUM_SERVICE_STATUS_PROCESS *pService, UINT Column)
BOOL UpdateServiceStatus(ENUM_SERVICE_STATUS_PROCESS *pService)
struct tagNMLISTVIEW * LPNMLISTVIEW
HLOCAL NTAPI LocalFree(HLOCAL hMem)
#define IDS_TOOLTIP_EXPORT
static INT CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
VOID SetListViewStyle(HWND hListView, DWORD View)
BOOL CreateListView(PMAIN_WND_INFO Info)
#define IDS_HINT_SYS_MAXIMIZE
VOID SetMenuAndButtonStates(PMAIN_WND_INFO Info)
#define ListView_SortItemsEx(hwndLV, _pfnCompare, _lPrm)
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
#define IDS_HINT_SYS_CLOSE
#define WS_OVERLAPPEDWINDOW
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
static VOID MainWndCommand(PMAIN_WND_INFO Info, WORD CmdId, HWND hControl)
#define IDS_TOOLTIP_START
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
INT_PTR CALLBACK CreateDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
#define Header_SetItem(hwndHD, i, phdi)
BOOL InitMainWindowImpl(VOID)
HMENU WINAPI GetMenu(_In_ HWND)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define HeapFree(x, y, z)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
static const TBBUTTON Buttons[]
#define TB_SETEXTENDEDSTYLE
BOOL StatusBarLoadString(IN HWND hStatusBar, IN INT PartId, IN HINSTANCE hInstance, IN UINT uID)
HWND CreateMainWindow(LPCTSTR lpCaption, int nCmdShow)
VOID FreeServiceList(PMAIN_WND_INFO Info)