89 UINT HintId = DefHintId;
91 LastHint = HintArray + HintsCount;
92 while (HintArray != LastHint)
94 if (HintArray->
CmdId == CmdId)
96 HintId = HintArray->
HintId;
133 WCHAR szNumServices[32];
175 if (
Info->bIsUserAnAdmin)
183 Flags =
Info->pCurrentService->ServiceStatusProcess.dwControlsAccepted;
184 State =
Info->pCurrentService->ServiceStatusProcess.dwCurrentState;
246 WCHAR Item1[256], Item2[256];
251 return wcscmp(Item1, Item2) *
Info->SortDirection;
288 if (hImageList ==
NULL)
310 INT StatWidths[] = {130, -1};
326 sizeof(StatWidths) /
sizeof(
INT),
356 if (
Info->bIsUserAnAdmin)
384 WCHAR szAppAuthors[256];
457 sizeof(Buf) /
sizeof(
WCHAR));
469 Info->pCurrentService->lpServiceName,
470 Info->pCurrentService->lpDisplayName,
484 Info->pCurrentService->lpServiceName,
485 Info->pCurrentService->lpDisplayName,
498 Info->pCurrentService->lpServiceName,
499 Info->pCurrentService->lpDisplayName,
511 Info->pCurrentService->lpServiceName,
512 Info->pCurrentService->lpDisplayName,
524 Info->pCurrentService->lpServiceName,
525 Info->pCurrentService->lpDisplayName,
537 L"Help is not yet implemented\n",
612 RECT rcClient, rcTool, rcStatus;
613 int lvHeight, iToolHeight, iStatusHeight;
618 iToolHeight = rcTool.
bottom - rcTool.
top;
623 iStatusHeight = rcStatus.
bottom - rcStatus.
top;
627 lvHeight = rcClient.
bottom - iToolHeight - iStatusHeight;
652 goto HandleDefaultMessage;
695 switch (pnmhdr->
code)
739 Info->SortDirection = hdi.lParam;
773 idButton = (
UINT)lpttt->hdr.idFrom;
847 goto HandleDefaultMessage;
935 Info->nCmdShow = nCmdShow;
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
#define IDS_TOOLTIP_PAUSE
INT_PTR CALLBACK CreateDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
INT_PTR CALLBACK DeleteDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
VOID ExportFile(PMAIN_WND_INFO Info)
VOID SetListViewStyle(HWND hListView, DWORD View)
BOOL RefreshServiceList(PMAIN_WND_INFO Info)
VOID ChangeListViewText(PMAIN_WND_INFO Info, ENUM_SERVICE_STATUS_PROCESS *pService, UINT Column)
VOID ListViewSelectionChanged(PMAIN_WND_INFO Info, LPNMLISTVIEW pnmv)
BOOL CreateListView(PMAIN_WND_INFO Info)
VOID UninitMainWindowImpl(VOID)
static const TBBUTTON Buttons[]
static BOOL InitMainWnd(PMAIN_WND_INFO Info)
static BOOL MainWndMenuHint(PMAIN_WND_INFO Info, WORD CmdId, const MENU_HINT *HintArray, DWORD HintsCount, UINT DefHintId)
static BOOL pCreateToolbar(PMAIN_WND_INFO Info)
static VOID CALLBACK MainWndResize(PMAIN_WND_INFO Info, WORD cx, WORD cy)
VOID SetMenuAndButtonStates(PMAIN_WND_INFO Info)
static const WCHAR szMainWndClass[]
static const MENU_HINT SystemMenuHintTable[]
static BOOL CreateStatusBar(PMAIN_WND_INFO Info)
VOID UpdateServiceCount(PMAIN_WND_INFO Info)
BOOL InitMainWindowImpl(VOID)
static LRESULT CALLBACK MainWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static VOID UpdateMainStatusBar(PMAIN_WND_INFO Info)
static const MENU_HINT MainMenuHintTable[]
static INT CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
static VOID MainWndCommand(PMAIN_WND_INFO Info, WORD CmdId, HWND hControl)
VOID DisplayString(LPWSTR Msg)
HIMAGELIST InitImageList(UINT StartResource, UINT EndResource, UINT Width, UINT Height, ULONG type)
BOOL StatusBarLoadString(IN HWND hStatusBar, IN INT PartId, IN HINSTANCE hInstance, IN UINT uID)
LPQUERY_SERVICE_CONFIG GetServiceConfig(LPWSTR lpServiceName)
VOID OpenPropSheet(PMAIN_WND_INFO Info)
struct _MAIN_WND_INFO * PMAIN_WND_INFO
VOID FreeServiceList(PMAIN_WND_INFO Info)
BOOL RunActionWithProgress(HWND hParent, LPWSTR ServiceName, LPWSTR DisplayName, UINT Action, PVOID Param)
BOOL UpdateServiceStatus(ENUM_SERVICE_STATUS_PROCESS *pService)
#define IDS_HINT_SYS_CLOSE
#define IDS_TOOLTIP_CREATE
#define IDS_TOOLTIP_RESTART
#define IDS_HINT_SYS_MINIMIZE
#define IDS_HINT_SYS_SIZE
#define IDS_HINT_SYS_RESTORE
#define IDS_TOOLTIP_EXPORT
#define IDS_TOOLTIP_REFRESH
#define IDS_HINT_SYS_MOVE
#define IDS_TOOLTIP_START
#define IDS_TOOLTIP_DELETE
#define IDS_HINT_SYS_MAXIMIZE
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
#define HeapFree(x, y, z)
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
HLOCAL NTAPI LocalFree(HLOCAL hMem)
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define UNREFERENCED_PARAMETER(P)
#define WS_OVERLAPPEDWINDOW
#define Header_GetItem(hwndHD, i, phdi)
_Out_opt_ int _Out_opt_ int * cy
#define TB_SETEXTENDEDSTYLE
#define TBSTATE_INDETERMINATE
#define Header_SetItem(hwndHD, i, phdi)
#define ListView_GetItemText(hwndLV, i, iSubItem_, pszText_, cchTextMax_)
#define TB_BUTTONSTRUCTSIZE
#define ListView_Arrange(hwndLV, code)
#define TBSTYLE_EX_HIDECLIPPEDBUTTONS
#define ListView_GetItemCount(hwnd)
struct tagNMLISTVIEW * LPNMLISTVIEW
#define ListView_SortItemsEx(hwndLV, _pfnCompare, _lPrm)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
#define SERVICE_ACCEPT_STOP
#define SERVICE_ACCEPT_PAUSE_CONTINUE
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
HWND WINAPI SetFocus(_In_opt_ HWND)
struct tagNMHDR * LPNMHDR
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define MB_ICONINFORMATION
#define MAKEINTRESOURCEW(i)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
int WINAPI GetSystemMetrics(_In_ int)
HMENU WINAPI GetMenu(_In_ HWND)
_Must_inspect_result_ _In_ ULONG Flags