ReactOS 0.4.15-dev-7887-g64a59a1
toolspage.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

INT_PTR CALLBACK ToolsPageWndProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 

Variables

HWND hToolsPage
 
HWND hToolsListCtrl
 

Function Documentation

◆ ToolsPageWndProc()

INT_PTR CALLBACK ToolsPageWndProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 56 of file toolspage.c.

57{
59 TCHAR szTemp[MAX_PATH*2];
60 TCHAR szTemp2[256];
61 TCHAR * Ptr = NULL;
62 LPNMITEMACTIVATE lpnmitem;
63 LPNMHDR nmh;
64 DWORD dwStyle;
66 STARTUPINFO si;
67
68 switch (message)
69 {
70 case WM_INITDIALOG:
71 {
73 hToolsDialog = hDlg;
74
76 dwStyle = dwStyle | LVS_EX_FULLROWSELECT;
78
80
81 // Initialize the application page's controls
83
85 column.pszText = szTemp;
86 column.cx = 150;
88
91 column.pszText = szTemp;
92 column.cx = 500;
94
96 return TRUE;
97 }
98 case WM_COMMAND:
99 {
100 switch (LOWORD(wParam))
101 {
102 case IDC_BTN_RUN:
103 {
105 {
107 Ptr = PathAddBackslash(szTemp);
108
109 if (!Ptr)
110 Ptr = szTemp;
111
112 szTemp2[0] = _T('\0');
115 if (_tcslen(szTemp2))
116 {
117 _tcscat(szTemp, _T(" "));
118 _tcscat(Ptr, szTemp2);
119 }
120 ZeroMemory(&si, sizeof(STARTUPINFO));
121 si.cb = sizeof(STARTUPINFO);
122 if (CreateProcess(NULL, szTemp, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
123 {
124 CloseHandle(pi.hThread);
125 CloseHandle(pi.hProcess);
126 }
127 }
128 }
129 }
130 break;
131 }
132 case WM_NOTIFY:
133 {
134 nmh = (LPNMHDR) lParam;
135 if (nmh->hwndFrom == hToolsListCtrl)
136 {
137 switch (nmh->code)
138 {
139 case LVN_ITEMCHANGED:
140 {
141 lpnmitem = (LPNMITEMACTIVATE) lParam;
142 if (lpnmitem->iItem > -1)
143 {
144 LoadString(hInst, ListItems_Cmds[lpnmitem->iItem], szTemp, 256);
145 szTemp2[0] = _T('\0');
146 LoadString(hInst, ListItems_Params[lpnmitem->iItem], szTemp2, 256);
147 _tcscat(szTemp, _T(" "));
148 _tcscat(szTemp, szTemp2);
150 }
151 break;
152 }
153 case NM_DBLCLK:
154 {
155 lpnmitem = (LPNMITEMACTIVATE) lParam;
156 if (lpnmitem->iItem > -1)
157 {
159 Ptr = PathAddBackslash(szTemp);
160
161 if (!Ptr)
162 Ptr = szTemp;
163
164 szTemp2[0] = _T('\0');
165 LoadString(hInst, ListItems_Cmds[lpnmitem->iItem], Ptr, 256);
166 LoadString(hInst, ListItems_Params[lpnmitem->iItem], szTemp2, 256);
167 if (_tcslen(szTemp2))
168 {
169 _tcscat(szTemp, _T(" "));
170 _tcscat(Ptr, szTemp2);
171 }
172 ZeroMemory(&si, sizeof(STARTUPINFO));
173 si.cb = sizeof(STARTUPINFO);
174 if (CreateProcess(NULL, szTemp, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
175 {
176 CloseHandle(pi.hThread);
177 CloseHandle(pi.hProcess);
178 }
179 }
180 break;
181 }
182 }
183 }
184 }
185 break;
186 }
187 return 0;
188}
#define IDS_TOOLS_COLUMN_DESCR
Definition: resource.h:80
#define IDC_TOOLS_LIST
Definition: resource.h:18
#define IDS_TOOLS_COLUMN_NAME
Definition: resource.h:79
#define IDC_BTN_RUN
Definition: resource.h:16
#define IDC_TOOLS_CMDLINE
Definition: resource.h:15
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CloseHandle
Definition: compat.h:739
#define MAX_PATH
Definition: compat.h:34
HINSTANCE hInst
Definition: dxdiag.c:13
unsigned long DWORD
Definition: ntddk_ex.h:95
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
#define _tcscat
Definition: tchar.h:622
static refpint_t pi[]
Definition: server.c:96
#define DWORD
Definition: nt_native.h:44
#define LOWORD(l)
Definition: pedump.c:82
#define ListView_InsertColumn(hwnd, iCol, pcol)
Definition: commctrl.h:2636
#define NM_DBLCLK
Definition: commctrl.h:131
#define LVCF_WIDTH
Definition: commctrl.h:2587
#define LVS_EX_FULLROWSELECT
Definition: commctrl.h:2734
struct tagNMITEMACTIVATE * LPNMITEMACTIVATE
#define ListView_GetSelectionMark(hwnd)
Definition: commctrl.h:2789
#define LVM_GETEXTENDEDLISTVIEWSTYLE
Definition: commctrl.h:2727
#define LVN_ITEMCHANGED
Definition: commctrl.h:3131
#define LVCF_TEXT
Definition: commctrl.h:2588
#define LVM_SETEXTENDEDLISTVIEWSTYLE
Definition: commctrl.h:2724
#define LV_COLUMN
Definition: commctrl.h:2547
#define WM_NOTIFY
Definition: richedit.h:61
#define SHGetSpecialFolderPath
Definition: shlobj.h:1522
#define PathAddBackslash
Definition: shlwapi.h:783
DWORD cb
Definition: winbase.h:831
Definition: tftpd.h:60
UINT code
Definition: winuser.h:3159
HWND hwndFrom
Definition: winuser.h:3157
DWORD ListItems_Cmds[20]
Definition: toolspage.c:21
HWND hToolsDialog
Definition: toolspage.c:16
DWORD ListItems_Params[20]
Definition: toolspage.c:22
HWND hToolsListCtrl
Definition: toolspage.c:15
void FillListView(void)
Definition: toolspage.c:48
DWORD ListItems_Locations[20]
Definition: toolspage.c:23
#define _T(x)
Definition: vfdio.h:22
#define CreateProcess
Definition: winbase.h:3758
#define ZeroMemory
Definition: winbase.h:1712
STARTUPINFOA STARTUPINFO
Definition: winbase.h:3719
LONG_PTR LPARAM
Definition: windef.h:208
#define SWP_NOACTIVATE
Definition: winuser.h:1242
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WM_COMMAND
Definition: winuser.h:1740
#define SWP_NOSIZE
Definition: winuser.h:1245
#define WM_INITDIALOG
Definition: winuser.h:1739
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_SETTEXT
Definition: winuser.h:1617
struct tagNMHDR * LPNMHDR
#define SendMessage
Definition: winuser.h:5843
#define LoadString
Definition: winuser.h:5819
#define SWP_NOOWNERZORDER
Definition: winuser.h:1249
#define SWP_NOZORDER
Definition: winuser.h:1247
#define SendDlgItemMessage
Definition: winuser.h:5842
char TCHAR
Definition: xmlstorage.h:189
#define _tcslen
Definition: xmlstorage.h:198

Variable Documentation

◆ hToolsListCtrl

HWND hToolsListCtrl
extern

Definition at line 15 of file toolspage.c.

Referenced by AddItem(), MsConfigWndProc(), and ToolsPageWndProc().

◆ hToolsPage

HWND hToolsPage
extern

Definition at line 14 of file toolspage.c.

Referenced by MsConfig_OnTabWndSelChange(), MsConfigWndProc(), and OnCreate().