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];
458 sizeof(Buf) /
sizeof(
WCHAR));
470 Info->pCurrentService->lpServiceName,
471 Info->pCurrentService->lpDisplayName,
485 Info->pCurrentService->lpServiceName,
486 Info->pCurrentService->lpDisplayName,
499 Info->pCurrentService->lpServiceName,
500 Info->pCurrentService->lpDisplayName,
512 Info->pCurrentService->lpServiceName,
513 Info->pCurrentService->lpDisplayName,
525 Info->pCurrentService->lpServiceName,
526 Info->pCurrentService->lpDisplayName,
538 L"Help is not yet implemented\n",
614 RECT rcClient, rcTool, rcStatus;
615 int lvHeight, iToolHeight, iStatusHeight;
620 iToolHeight = rcTool.
bottom - rcTool.
top;
625 iStatusHeight = rcStatus.
bottom - rcStatus.
top;
629 lvHeight = rcClient.
bottom - iToolHeight - iStatusHeight;
654 goto HandleDefaultMessage;
697 switch (pnmhdr->
code)
741 Info->SortDirection = hdi.lParam;
775 idButton = (
UINT)lpttt->hdr.idFrom;
849 goto HandleDefaultMessage;
909 HandleDefaultMessage:
937 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
BOOL WINAPI DestroyIcon(_In_ HICON)
#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)
_In_ ULONG _In_ ULONG State
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)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
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_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
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)
#define SERVICE_ACCEPT_PAUSE_CONTINUE
#define IDS_TOOLTIP_RESTART
#define IDS_HINT_SYS_MOVE
_Must_inspect_result_ _In_ ULONG Flags
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)
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
#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)
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
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
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
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 MAKEINTRESOURCEW(i)
#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)