ReactOS  0.4.12-dev-102-g4b7f1e0
procpage.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 ProcessPageWndProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
void RefreshProcessPage (void)
 
DWORD GetSelectedProcessId (void)
 

Variables

HWND hProcessPage
 
HWND hProcessPageListCtrl
 
HWND hProcessPageHeaderCtrl
 
HWND hProcessPageEndProcessButton
 
HWND hProcessPageShowAllProcessesButton
 

Function Documentation

◆ GetSelectedProcessId()

DWORD GetSelectedProcessId ( void  )

Definition at line 99 of file procpage.c.

Referenced by DebugChannels_FillList(), DebugChannels_OnNotify(), DoSetPriority(), ProcessPage_OnDebug(), ProcessPage_OnEndProcess(), ProcessPage_OnEndProcessTree(), ProcessPage_OnSetAffinity(), and ProcessPageOnNotify().

100 {
101  int Index;
102  LVITEM lvitem;
103 
105  {
107 
108  memset(&lvitem, 0, sizeof(LVITEM));
109 
110  lvitem.mask = LVIF_PARAM;
111  lvitem.iItem = Index;
112 
114 
115  if (lvitem.lParam)
116  return ((LPPROCESS_PAGE_LIST_ITEM)lvitem.lParam)->ProcessId;
117  }
118 
119  return 0;
120 }
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ProcessId
Definition: fatprocs.h:2697
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
#define ListView_GetSelectedCount(hwndLV)
Definition: commctrl.h:2679
static const UCHAR Index[8]
Definition: usbohci.c:18
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2364
#define LVIF_PARAM
Definition: commctrl.h:2281
#define LVITEM
Definition: commctrl.h:2345
#define ListView_GetSelectionMark(hwnd)
Definition: commctrl.h:2759
#define memset(x, y, z)
Definition: compat.h:39
HWND hProcessPageListCtrl
Definition: procpage.c:38

◆ ProcessPageWndProc()

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

Definition at line 132 of file procpage.c.

Referenced by OnCreate().

133 {
134  RECT rc;
135  int nXDifference;
136  int nYDifference;
137  int cx, cy;
138 
139  switch (message) {
140  case WM_INITDIALOG:
141  /*
142  * Save the width and height
143  */
144  GetClientRect(hDlg, &rc);
147 
148  /* Update window position */
150 
151  /*
152  * Get handles to the controls
153  */
158 
159  /*
160  * Set the title, and extended window styles for the list control
161  */
164 
165  AddColumns();
166 
167  /*
168  * Subclass the process list control so we can intercept WM_ERASEBKGND
169  */
171 
172 #ifdef RUN_PROC_PAGE
173  /* Start our refresh thread */
175 #endif
176 
177  /* Refresh page */
179 
180  return TRUE;
181 
182  case WM_DESTROY:
183  /* Close the event handle, this will make the */
184  /* refresh thread exit when the wait fails */
185 #ifdef RUN_PROC_PAGE
187 #endif
189  Cleanup();
190  break;
191 
192  case WM_COMMAND:
193  /* Handle the button clicks */
194  switch (LOWORD(wParam))
195  {
196  case IDC_ENDPROCESS:
198  }
199  break;
200 
201  case WM_SIZE:
202  if (wParam == SIZE_MINIMIZED)
203  return 0;
204 
205  cx = LOWORD(lParam);
206  cy = HIWORD(lParam);
207  nXDifference = cx - nProcessPageWidth;
208  nYDifference = cy - nProcessPageHeight;
209  nProcessPageWidth = cx;
210  nProcessPageHeight = cy;
211 
212  /* Reposition the application page's controls */
214  cx = (rc.right - rc.left) + nXDifference;
215  cy = (rc.bottom - rc.top) + nYDifference;
218 
220  MapWindowPoints(hProcessPageEndProcessButton, hDlg, (LPPOINT)(PRECT)(&rc), sizeof(RECT)/sizeof(POINT));
221  cx = rc.left + nXDifference;
222  cy = rc.top + nYDifference;
225 
228  cx = rc.left;
229  cy = rc.top + nYDifference;
232  break;
233 
234  case WM_NOTIFY:
236  break;
237 
238  case WM_KEYDOWN:
239  if (wParam == VK_DELETE)
241  break;
242  }
243 
244  return 0;
245 }
INT_PTR CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: proclist.c:31
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
static int nProcessPageWidth
Definition: procpage.c:44
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define IDC_PROCESSLIST
Definition: resource.h:37
HWND hProcessPageEndProcessButton
Definition: procpage.c:40
#define IDC_SHOWALLPROCESSES
Definition: resource.h:41
#define ListView_GetHeader(hwnd)
Definition: commctrl.h:2621
#define LVS_EX_FULLROWSELECT
Definition: commctrl.h:2704
LONG top
Definition: windef.h:297
static DWORD dwProcessThread
Definition: procpage.c:48
HWND hProcessPageShowAllProcessesButton
Definition: procpage.c:41
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
LONG left
Definition: windef.h:296
#define SWP_NOZORDER
Definition: winuser.h:1232
DWORD EndLocalThread(HANDLE *hThread, DWORD dwThread)
Definition: taskmgr.c:1178
LONG right
Definition: windef.h:298
static int nProcessPageHeight
Definition: procpage.c:45
WPARAM wParam
Definition: combotst.c:138
void Cleanup(void)
Definition: procpage.c:62
#define ListView_GetExtendedListViewStyle(hwndLV)
Definition: commctrl.h:2698
HWND hProcessPageHeaderCtrl
Definition: procpage.c:39
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:112
#define LVS_EX_HEADERDRAGDROP
Definition: commctrl.h:2703
void SaveColumnSettings(void)
Definition: column.c:105
void ProcessPage_OnEndProcess(void)
Definition: endproc.c:30
smooth NULL
Definition: ftsmooth.c:416
#define WM_KEYDOWN
Definition: winuser.h:1691
#define VK_DELETE
Definition: winuser.h:2187
#define WM_DESTROY
Definition: winuser.h:1591
#define IDC_ENDPROCESS
Definition: resource.h:36
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_SIZE
Definition: winuser.h:1593
#define SWP_NOACTIVATE
Definition: winuser.h:1227
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define SIZE_MINIMIZED
Definition: winuser.h:2460
#define ListView_SetExtendedListViewStyle(hwndLV, dw)
Definition: commctrl.h:2695
void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam)
Definition: procpage.c:247
static const WCHAR L[]
Definition: oid.c:1087
#define WM_COMMAND
Definition: winuser.h:1716
#define GWLP_WNDPROC
Definition: treelist.c:66
WNDPROC OldProcessListWndProc
Definition: proclist.c:27
#define SWP_NOSIZE
Definition: winuser.h:1230
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2859
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
DWORD WINAPI ProcessPageRefreshThread(void *lpParameter)
Definition: procpage.c:420
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
void ProcessPageUpdate(void)
Definition: procpage.c:122
static HANDLE hProcessThread
Definition: procpage.c:47
_Out_opt_ int * cx
Definition: commctrl.h:570
#define HIWORD(l)
Definition: typedefs.h:246
LONG bottom
Definition: windef.h:299
#define SWP_NOMOVE
Definition: winuser.h:1229
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SetWindowLongPtrW
Definition: winuser.h:5215
HWND hProcessPageListCtrl
Definition: procpage.c:38
#define WM_INITDIALOG
Definition: winuser.h:1715
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define WM_NOTIFY
Definition: richedit.h:61
void AddColumns(void)
Definition: column.c:63
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234

◆ RefreshProcessPage()

void RefreshProcessPage ( void  )

Definition at line 411 of file procpage.c.

Referenced by OnCreate(), TaskManager_OnOptionsShow16BitTasks(), and TaskManagerWndProc().

412 {
413 #ifdef RUN_PROC_PAGE
414  /* Signal the event so that our refresh thread */
415  /* will wake up and refresh the process page */
417 #endif
418 }
static DWORD dwProcessThread
Definition: procpage.c:48
#define WM_TIMER
Definition: winuser.h:1718
#define PostThreadMessage
Definition: winuser.h:5699

Variable Documentation

◆ hProcessPage

HWND hProcessPage

Definition at line 36 of file procpage.c.

Referenced by OnCreate(), OnMove(), OnSize(), and TaskManager_OnTabWndSelChange().

◆ hProcessPageEndProcessButton

HWND hProcessPageEndProcessButton

Definition at line 40 of file procpage.c.

◆ hProcessPageHeaderCtrl

HWND hProcessPageHeaderCtrl

◆ hProcessPageListCtrl

◆ hProcessPageShowAllProcessesButton

HWND hProcessPageShowAllProcessesButton

Definition at line 41 of file procpage.c.