ReactOS  0.4.12-dev-14-gd0c8636
applpage.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 ApplicationPageWndProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
void RefreshApplicationPage (void)
 
void UpdateApplicationListControlViewSetting (void)
 
void ApplicationPage_OnView (DWORD)
 
void ApplicationPage_OnWindowsTile (DWORD)
 
void ApplicationPage_OnWindowsMinimize (void)
 
void ApplicationPage_OnWindowsMaximize (void)
 
void ApplicationPage_OnWindowsCascade (void)
 
void ApplicationPage_OnWindowsBringToFront (void)
 
void ApplicationPage_OnSwitchTo (void)
 
void ApplicationPage_OnEndTask (void)
 
void ApplicationPage_OnGotoProcess (void)
 

Variables

HWND hApplicationPage
 
HWND hApplicationPageListCtrl
 
HWND hApplicationPageEndTaskButton
 
HWND hApplicationPageSwitchToButton
 
HWND hApplicationPageNewTaskButton
 

Function Documentation

◆ ApplicationPage_OnEndTask()

void ApplicationPage_OnEndTask ( void  )

Definition at line 905 of file applpage.c.

Referenced by ApplicationPageOnNotify(), ApplicationPageWndProc(), and TaskManagerWndProc().

906 {
908  LV_ITEM item;
909  int i;
910 
911  /* Trick: on Windows, pressing the CTRL key forces the task to be ended */
912  BOOL ForceEndTask = !!(GetKeyState(VK_CONTROL) & 0x8000);
913 
915  memset(&item, 0, sizeof(LV_ITEM));
916  item.mask = LVIF_STATE|LVIF_PARAM;
917  item.iItem = i;
918  item.stateMask = (UINT)-1;
920  if (item.state & LVIS_SELECTED) {
921  pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
922  if (pAPLI) {
923  EndTask(pAPLI->hWnd, 0, ForceEndTask);
924  }
925  }
926  }
927 }
#define LV_ITEM
Definition: commctrl.h:2307
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
HWND hApplicationPageListCtrl
Definition: applpage.c:35
GLenum GLclampf GLint i
Definition: glfuncs.h:14
smooth NULL
Definition: ftsmooth.c:416
#define LVIS_SELECTED
Definition: commctrl.h:2289
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2277
SHORT WINAPI GetKeyState(_In_ int)
unsigned int BOOL
Definition: ntddk_ex.h:94
if(!(yy_init))
Definition: macro.lex.yy.c:717
struct APPLICATION_PAGE_LIST_ITEM * LPAPPLICATION_PAGE_LIST_ITEM
static ATOM item
Definition: dde.c:856
BOOL WINAPI EndTask(HWND hWnd, BOOL fShutDown, BOOL fForce)
Definition: exit.c:207
#define VK_CONTROL
Definition: winuser.h:2157
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2364
#define LVIF_PARAM
Definition: commctrl.h:2281
#define LVIF_STATE
Definition: commctrl.h:2282
#define UINT
Definition: msvc.h:27
#define memset(x, y, z)
Definition: compat.h:39

◆ ApplicationPage_OnGotoProcess()

void ApplicationPage_OnGotoProcess ( void  )

Definition at line 929 of file applpage.c.

Referenced by TaskManagerWndProc().

930 {
932  LV_ITEM item;
933  int i;
934 
936  memset(&item, 0, sizeof(LV_ITEM));
937  item.mask = LVIF_STATE|LVIF_PARAM;
938  item.iItem = i;
939  item.stateMask = (UINT)-1;
941  if (item.state & LVIS_SELECTED) {
942  pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
943  break;
944  }
945  }
946  if (pAPLI) {
947  DWORD dwProcessId;
948 
949  GetWindowThreadProcessId(pAPLI->hWnd, &dwProcessId);
950  /*
951  * Switch to the process tab
952  */
954  /*
955  * Select the process item in the list
956  */
957  i = ProcGetIndexByProcessId(dwProcessId);
958  if (i != -1)
959  {
961  i,
965  i,
966  FALSE);
967  }
968  }
969 }
#define ListView_EnsureVisible(hwndLV, i, fPartialOK)
Definition: commctrl.h:2489
#define LV_ITEM
Definition: commctrl.h:2307
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
HWND hApplicationPageListCtrl
Definition: applpage.c:35
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define ListView_SetItemState(hwndLV, i, data, mask)
Definition: commctrl.h:2643
HWND hTabWnd
Definition: msconfig.c:22
DWORD WINAPI GetWindowThreadProcessId(HWND, PDWORD)
smooth NULL
Definition: ftsmooth.c:416
#define LVIS_SELECTED
Definition: commctrl.h:2289
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2277
int ProcGetIndexByProcessId(DWORD dwProcessId)
Definition: procpage.c:78
unsigned long DWORD
Definition: ntddk_ex.h:95
struct APPLICATION_PAGE_LIST_ITEM * LPAPPLICATION_PAGE_LIST_ITEM
static ATOM item
Definition: dde.c:856
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2364
#define LVIF_PARAM
Definition: commctrl.h:2281
#define LVIF_STATE
Definition: commctrl.h:2282
#define UINT
Definition: msvc.h:27
#define memset(x, y, z)
Definition: compat.h:39
HWND hProcessPageListCtrl
Definition: procpage.c:38
#define LVIS_FOCUSED
Definition: commctrl.h:2288
#define TabCtrl_SetCurFocus(hwnd, i)
Definition: commctrl.h:4069

◆ ApplicationPage_OnSwitchTo()

void ApplicationPage_OnSwitchTo ( void  )

Definition at line 868 of file applpage.c.

Referenced by ApplicationPageOnNotify(), ApplicationPageWndProc(), and TaskManagerWndProc().

869 {
871  LV_ITEM item;
872  int i;
873 
875  memset(&item, 0, sizeof(LV_ITEM));
876  item.mask = LVIF_STATE|LVIF_PARAM;
877  item.iItem = i;
878  item.stateMask = (UINT)-1;
880 
881  if (item.state & LVIS_SELECTED) {
882  pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
883  break;
884  }
885  }
886  if (pAPLI) {
887  typedef void (WINAPI *PROCSWITCHTOTHISWINDOW) (HWND, BOOL);
888  PROCSWITCHTOTHISWINDOW SwitchToThisWindow;
889 
890  HMODULE hUser32 = GetModuleHandleW(L"USER32");
891  SwitchToThisWindow = (PROCSWITCHTOTHISWINDOW)GetProcAddress(hUser32, "SwitchToThisWindow");
892  if (SwitchToThisWindow) {
893  SwitchToThisWindow(pAPLI->hWnd, TRUE);
894  } else {
895  if (IsIconic(pAPLI->hWnd))
896  ShowWindow(pAPLI->hWnd, SW_RESTORE);
897  BringWindowToTop(pAPLI->hWnd);
898  SetForegroundWindow(pAPLI->hWnd);
899  }
902  }
903 }
#define LV_ITEM
Definition: commctrl.h:2307
#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
HANDLE HWND
Definition: compat.h:13
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SW_RESTORE
Definition: winuser.h:773
HWND hApplicationPageListCtrl
Definition: applpage.c:35
BOOL WINAPI IsIconic(_In_ HWND)
GLenum GLclampf GLint i
Definition: glfuncs.h:14
BOOL WINAPI BringWindowToTop(_In_ HWND)
smooth NULL
Definition: ftsmooth.c:416
#define LVIS_SELECTED
Definition: commctrl.h:2289
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2277
#define SW_MINIMIZE
Definition: winuser.h:770
HWND hMainWnd
Definition: magnifier.c:33
static const WCHAR L[]
Definition: oid.c:1087
struct APPLICATION_PAGE_LIST_ITEM * LPAPPLICATION_PAGE_LIST_ITEM
#define WINAPI
Definition: msvc.h:20
static ATOM item
Definition: dde.c:856
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2364
#define LVIF_PARAM
Definition: commctrl.h:2281
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:845
BOOL WINAPI SetForegroundWindow(_In_ HWND)
TASKMANAGER_SETTINGS TaskManagerSettings
Definition: taskmgr.c:52
#define GetProcAddress(x, y)
Definition: compat.h:410
#define LVIF_STATE
Definition: commctrl.h:2282
#define UINT
Definition: msvc.h:27
#define memset(x, y, z)
Definition: compat.h:39
#define BOOL
Definition: msvc.h:23
VOID WINAPI SwitchToThisWindow(HWND hwnd, BOOL fAltTab)
Definition: window.c:82

◆ ApplicationPage_OnView()

void ApplicationPage_OnView ( DWORD  )

Definition at line 728 of file applpage.c.

Referenced by TaskManagerWndProc().

729 {
730  HMENU hMenu;
731  HMENU hViewMenu;
732 
733  hMenu = GetMenu(hMainWnd);
734  hViewMenu = GetSubMenu(hMenu, 2);
735 
738 
740 }
#define ID_VIEW_DETAILS
Definition: resource.h:38
#define MF_BYCOMMAND
Definition: winuser.h:202
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
void UpdateApplicationListControlViewSetting(void)
Definition: applpage.c:256
HWND hMainWnd
Definition: magnifier.c:33
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
TASKMANAGER_SETTINGS TaskManagerSettings
Definition: taskmgr.c:52
HMENU WINAPI GetMenu(_In_ HWND)
DWORD HDC HDC DVTARGETDEVICE DWORD dwMode
Definition: msvc.h:106
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
#define ID_VIEW_LARGE
Definition: resource.h:35

◆ ApplicationPage_OnWindowsBringToFront()

void ApplicationPage_OnWindowsBringToFront ( void  )

Definition at line 844 of file applpage.c.

Referenced by TaskManagerWndProc().

845 {
847  LV_ITEM item;
848  int i;
849 
851  memset(&item, 0, sizeof(LV_ITEM));
852  item.mask = LVIF_STATE|LVIF_PARAM;
853  item.iItem = i;
854  item.stateMask = (UINT)-1;
856  if (item.state & LVIS_SELECTED) {
857  pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
858  break;
859  }
860  }
861  if (pAPLI) {
862  if (IsIconic(pAPLI->hWnd))
863  ShowWindow(pAPLI->hWnd, SW_RESTORE);
864  BringWindowToTop(pAPLI->hWnd);
865  }
866 }
#define LV_ITEM
Definition: commctrl.h:2307
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SW_RESTORE
Definition: winuser.h:773
HWND hApplicationPageListCtrl
Definition: applpage.c:35
BOOL WINAPI IsIconic(_In_ HWND)
GLenum GLclampf GLint i
Definition: glfuncs.h:14
BOOL WINAPI BringWindowToTop(_In_ HWND)
smooth NULL
Definition: ftsmooth.c:416
#define LVIS_SELECTED
Definition: commctrl.h:2289
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2277
struct APPLICATION_PAGE_LIST_ITEM * LPAPPLICATION_PAGE_LIST_ITEM
static ATOM item
Definition: dde.c:856
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2364
#define LVIF_PARAM
Definition: commctrl.h:2281
#define LVIF_STATE
Definition: commctrl.h:2282
#define UINT
Definition: msvc.h:27
#define memset(x, y, z)
Definition: compat.h:39

◆ ApplicationPage_OnWindowsCascade()

void ApplicationPage_OnWindowsCascade ( void  )

Definition at line 815 of file applpage.c.

Referenced by TaskManagerWndProc().

816 {
818  LV_ITEM item;
819  int i;
820  HWND* hWndArray;
821  int nWndCount;
822 
824  nWndCount = 0;
825 
827  memset(&item, 0, sizeof(LV_ITEM));
828  item.mask = LVIF_STATE|LVIF_PARAM;
829  item.iItem = i;
830  item.stateMask = (UINT)-1;
832  if (item.state & LVIS_SELECTED) {
833  pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
834  if (pAPLI) {
835  hWndArray[nWndCount] = pAPLI->hWnd;
836  nWndCount++;
837  }
838  }
839  }
840  CascadeWindows(NULL, 0, NULL, nWndCount, hWndArray);
841  HeapFree(GetProcessHeap(), 0, hWndArray);
842 }
#define LV_ITEM
Definition: commctrl.h:2307
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
HANDLE HWND
Definition: compat.h:13
HWND hApplicationPageListCtrl
Definition: applpage.c:35
GLenum GLclampf GLint i
Definition: glfuncs.h:14
smooth NULL
Definition: ftsmooth.c:416
#define LVIS_SELECTED
Definition: commctrl.h:2289
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2277
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
if(!(yy_init))
Definition: macro.lex.yy.c:717
struct APPLICATION_PAGE_LIST_ITEM * LPAPPLICATION_PAGE_LIST_ITEM
static ATOM item
Definition: dde.c:856
WORD WINAPI CascadeWindows(_In_opt_ HWND hwndParent, _In_ UINT wHow, _In_opt_ CONST RECT *lpRect, _In_ UINT cKids, _In_reads_opt_(cKids) const HWND FAR *lpKids)
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2364
#define LVIF_PARAM
Definition: commctrl.h:2281
#define LVIF_STATE
Definition: commctrl.h:2282
#define UINT
Definition: msvc.h:27
#define memset(x, y, z)
Definition: compat.h:39
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ ApplicationPage_OnWindowsMaximize()

void ApplicationPage_OnWindowsMaximize ( void  )

Definition at line 794 of file applpage.c.

Referenced by TaskManagerWndProc().

795 {
797  LV_ITEM item;
798  int i;
799 
801  memset(&item, 0, sizeof(LV_ITEM));
802  item.mask = LVIF_STATE|LVIF_PARAM;
803  item.iItem = i;
804  item.stateMask = (UINT)-1;
806  if (item.state & LVIS_SELECTED) {
807  pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
808  if (pAPLI) {
809  ShowWindow(pAPLI->hWnd, SW_MAXIMIZE);
810  }
811  }
812  }
813 }
#define LV_ITEM
Definition: commctrl.h:2307
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
HWND hApplicationPageListCtrl
Definition: applpage.c:35
GLenum GLclampf GLint i
Definition: glfuncs.h:14
smooth NULL
Definition: ftsmooth.c:416
#define LVIS_SELECTED
Definition: commctrl.h:2289
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2277
if(!(yy_init))
Definition: macro.lex.yy.c:717
struct APPLICATION_PAGE_LIST_ITEM * LPAPPLICATION_PAGE_LIST_ITEM
static ATOM item
Definition: dde.c:856
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2364
#define LVIF_PARAM
Definition: commctrl.h:2281
#define LVIF_STATE
Definition: commctrl.h:2282
#define UINT
Definition: msvc.h:27
#define memset(x, y, z)
Definition: compat.h:39
#define SW_MAXIMIZE
Definition: winuser.h:766

◆ ApplicationPage_OnWindowsMinimize()

void ApplicationPage_OnWindowsMinimize ( void  )

Definition at line 773 of file applpage.c.

Referenced by TaskManagerWndProc().

774 {
776  LV_ITEM item;
777  int i;
778 
780  memset(&item, 0, sizeof(LV_ITEM));
781  item.mask = LVIF_STATE|LVIF_PARAM;
782  item.iItem = i;
783  item.stateMask = (UINT)-1;
785  if (item.state & LVIS_SELECTED) {
786  pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
787  if (pAPLI) {
788  ShowWindow(pAPLI->hWnd, SW_MINIMIZE);
789  }
790  }
791  }
792 }
#define LV_ITEM
Definition: commctrl.h:2307
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
HWND hApplicationPageListCtrl
Definition: applpage.c:35
GLenum GLclampf GLint i
Definition: glfuncs.h:14
smooth NULL
Definition: ftsmooth.c:416
#define LVIS_SELECTED
Definition: commctrl.h:2289
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2277
if(!(yy_init))
Definition: macro.lex.yy.c:717
#define SW_MINIMIZE
Definition: winuser.h:770
struct APPLICATION_PAGE_LIST_ITEM * LPAPPLICATION_PAGE_LIST_ITEM
static ATOM item
Definition: dde.c:856
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2364
#define LVIF_PARAM
Definition: commctrl.h:2281
#define LVIF_STATE
Definition: commctrl.h:2282
#define UINT
Definition: msvc.h:27
#define memset(x, y, z)
Definition: compat.h:39

◆ ApplicationPage_OnWindowsTile()

void ApplicationPage_OnWindowsTile ( DWORD  )

Definition at line 742 of file applpage.c.

Referenced by TaskManagerWndProc().

743 {
745  LV_ITEM item;
746  int i;
747  HWND* hWndArray;
748  int nWndCount;
749 
751  nWndCount = 0;
752 
754  memset(&item, 0, sizeof(LV_ITEM));
755  item.mask = LVIF_STATE|LVIF_PARAM;
756  item.iItem = i;
757  item.stateMask = (UINT)-1;
759 
760  if (item.state & LVIS_SELECTED) {
761  pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
762  if (pAPLI) {
763  hWndArray[nWndCount] = pAPLI->hWnd;
764  nWndCount++;
765  }
766  }
767  }
768 
769  TileWindows(NULL, dwMode, NULL, nWndCount, hWndArray);
770  HeapFree(GetProcessHeap(), 0, hWndArray);
771 }
#define LV_ITEM
Definition: commctrl.h:2307
WORD WINAPI TileWindows(_In_opt_ HWND hwndParent, _In_ UINT wHow, _In_opt_ CONST RECT *lpRect, _In_ UINT cKids, _In_reads_opt_(cKids) const HWND FAR *lpKids)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
HANDLE HWND
Definition: compat.h:13
HWND hApplicationPageListCtrl
Definition: applpage.c:35
GLenum GLclampf GLint i
Definition: glfuncs.h:14
smooth NULL
Definition: ftsmooth.c:416
#define LVIS_SELECTED
Definition: commctrl.h:2289
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2277
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
if(!(yy_init))
Definition: macro.lex.yy.c:717
struct APPLICATION_PAGE_LIST_ITEM * LPAPPLICATION_PAGE_LIST_ITEM
static ATOM item
Definition: dde.c:856
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2364
#define LVIF_PARAM
Definition: commctrl.h:2281
#define LVIF_STATE
Definition: commctrl.h:2282
#define UINT
Definition: msvc.h:27
#define memset(x, y, z)
Definition: compat.h:39
DWORD HDC HDC DVTARGETDEVICE DWORD dwMode
Definition: msvc.h:106
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ ApplicationPageWndProc()

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

Definition at line 110 of file applpage.c.

Referenced by OnCreate().

111 {
112  RECT rc;
113  int nXDifference;
114  int nYDifference;
116  WCHAR szTemp[256];
117  int cx, cy;
118 
119  switch (message) {
120  case WM_INITDIALOG:
121 
122  /* Save the width and height */
123  GetClientRect(hDlg, &rc);
126 
127  /* Update window position */
129 
130  /* Get handles to the controls */
135 
137 
138  /* Initialize the application page's controls */
139  column.mask = LVCF_TEXT|LVCF_WIDTH;
140 
141  LoadStringW(hInst, IDS_TAB_TASK, szTemp, 256);
142  column.pszText = szTemp;
143  column.cx = 250;
144  (void)ListView_InsertColumn(hApplicationPageListCtrl, 0, &column); /* Add the "Task" column */
145  column.mask = LVCF_TEXT|LVCF_WIDTH;
146  LoadStringW(hInst, IDS_TAB_STATUS, szTemp, 256);
147  column.pszText = szTemp;
148  column.cx = 95;
149  (void)ListView_InsertColumn(hApplicationPageListCtrl, 1, &column); /* Add the "Status" column */
150 
153 
155 
156  /* Start our refresh thread */
157 #ifdef RUN_APPS_PAGE
159 #endif
160 
161  /* Refresh page */
163 
164  return TRUE;
165 
166  case WM_DESTROY:
167  /* Close refresh thread */
168 #ifdef RUN_APPS_PAGE
170 #endif
171  AppPageCleanup();
172  break;
173 
174  case WM_COMMAND:
175 
176  /* Handle the button clicks */
177  switch (LOWORD(wParam))
178  {
179  case IDC_ENDTASK:
181  break;
182  case IDC_SWITCHTO:
184  break;
185  case IDC_NEWTASK:
187  break;
188  }
189 
190  break;
191 
192  case WM_SIZE:
193  if (wParam == SIZE_MINIMIZED)
194  return 0;
195 
196  cx = LOWORD(lParam);
197  cy = HIWORD(lParam);
198  nXDifference = cx - nApplicationPageWidth;
199  nYDifference = cy - nApplicationPageHeight;
200  nApplicationPageWidth = cx;
201  nApplicationPageHeight = cy;
202 
203  /* Reposition the application page's controls */
205  cx = (rc.right - rc.left) + nXDifference;
206  cy = (rc.bottom - rc.top) + nYDifference;
209 
211  MapWindowPoints(hApplicationPageEndTaskButton, hDlg, (LPPOINT)(PRECT)(&rc), sizeof(RECT)/sizeof(POINT));
212  cx = rc.left + nXDifference;
213  cy = rc.top + nYDifference;
216 
218  MapWindowPoints(hApplicationPageSwitchToButton, hDlg, (LPPOINT)(PRECT)(&rc), sizeof(RECT)/sizeof(POINT));
219  cx = rc.left + nXDifference;
220  cy = rc.top + nYDifference;
223 
225  MapWindowPoints(hApplicationPageNewTaskButton, hDlg, (LPPOINT)(PRECT)(&rc), sizeof(RECT)/sizeof(POINT));
226  cx = rc.left + nXDifference;
227  cy = rc.top + nYDifference;
230 
231  break;
232 
233  case WM_NOTIFY:
235  break;
236 
237  case WM_KEYDOWN:
238  if (wParam == VK_DELETE)
240  break;
241 
242  }
243 
244  return 0;
245 }
Definition: tftpd.h:59
void AppPageCleanup(void)
Definition: applpage.c:92
#define TRUE
Definition: types.h:120
#define MAKEWPARAM(l, h)
Definition: winuser.h:3916
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
#define LVCF_WIDTH
Definition: commctrl.h:2557
#define LVSIL_SMALL
Definition: commctrl.h:2269
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define LVCF_TEXT
Definition: commctrl.h:2558
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define LV_COLUMN
Definition: commctrl.h:2517
static INT GetSystemColorDepth(VOID)
Definition: applpage.c:68
static HANDLE hApplicationThread
Definition: applpage.c:56
LONG top
Definition: windef.h:297
#define IDC_APPLIST
Definition: resource.h:35
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
HWND hApplicationPageListCtrl
Definition: applpage.c:35
#define IDC_SWITCHTO
Definition: resource.h:32
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
WPARAM wParam
Definition: combotst.c:138
HWND hApplicationPageNewTaskButton
Definition: applpage.c:38
static DWORD dwApplicationThread
Definition: applpage.c:57
#define ListView_InsertColumn(hwnd, iCol, pcol)
Definition: commctrl.h:2606
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:769
#define IDC_NEWTASK
Definition: resource.h:33
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
static int nApplicationPageHeight
Definition: applpage.c:40
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 ListView_SetImageList(hwnd, himl, iImageList)
Definition: commctrl.h:2274
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 ID_FILE_NEW
Definition: resource.h:41
#define IDC_ENDTASK
Definition: resource.h:31
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
void ApplicationPage_OnEndTask(void)
Definition: applpage.c:905
#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)
void UpdateApplicationListControlViewSetting(void)
Definition: applpage.c:256
#define SIZE_MINIMIZED
Definition: winuser.h:2460
static int nApplicationPageWidth
Definition: applpage.c:39
HWND hMainWnd
Definition: magnifier.c:33
static const WCHAR L[]
Definition: oid.c:1087
#define ILC_MASK
Definition: commctrl.h:336
HWND hApplicationPageSwitchToButton
Definition: applpage.c:37
#define LVSIL_NORMAL
Definition: commctrl.h:2268
#define WM_COMMAND
Definition: winuser.h:1716
#define SWP_NOSIZE
Definition: winuser.h:1230
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HINSTANCE hInst
Definition: dxdiag.c:13
void ApplicationPageOnNotify(WPARAM wParam, LPARAM lParam)
Definition: applpage.c:567
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
_Out_opt_ int * cx
Definition: commctrl.h:570
HWND hApplicationPageEndTaskButton
Definition: applpage.c:36
#define HIWORD(l)
Definition: typedefs.h:246
LONG bottom
Definition: windef.h:299
DWORD WINAPI ApplicationPageRefreshThread(void *lpParameter)
Definition: applpage.c:272
#define SWP_NOMOVE
Definition: winuser.h:1229
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
void ApplicationPageUpdate(void)
Definition: applpage.c:503
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define IDS_TAB_STATUS
Definition: resource.h:200
GLenum GLenum GLvoid GLvoid * column
Definition: glext.h:5664
#define IDS_TAB_TASK
Definition: resource.h:199
#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
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234
void ApplicationPage_OnSwitchTo(void)
Definition: applpage.c:868

◆ RefreshApplicationPage()

void RefreshApplicationPage ( void  )

Definition at line 247 of file applpage.c.

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

248 {
249 #ifdef RUN_APPS_PAGE
250  /* Signal the event so that our refresh thread */
251  /* will wake up and refresh the application page */
253 #endif
254 }
static DWORD dwApplicationThread
Definition: applpage.c:57
#define WM_TIMER
Definition: winuser.h:1718
#define PostThreadMessage
Definition: winuser.h:5699

◆ UpdateApplicationListControlViewSetting()

void UpdateApplicationListControlViewSetting ( void  )

Definition at line 256 of file applpage.c.

Referenced by ApplicationPage_OnView(), and ApplicationPageWndProc().

257 {
259 
260  dwStyle &= ~(LVS_REPORT | LVS_ICON | LVS_LIST | LVS_SMALLICON);
261 
262  switch (TaskManagerSettings.ViewMode) {
263  case ID_VIEW_LARGE: dwStyle |= LVS_ICON; break;
264  case ID_VIEW_SMALL: dwStyle |= LVS_SMALLICON; break;
265  case ID_VIEW_DETAILS: dwStyle |= LVS_REPORT; break;
266  }
268 
270 }
#define ID_VIEW_DETAILS
Definition: resource.h:38
#define LVS_REPORT
Definition: commctrl.h:2232
#define GetWindowLongPtrW
Definition: winuser.h:4698
HWND hApplicationPageListCtrl
Definition: applpage.c:35
#define LVS_LIST
Definition: commctrl.h:2234
void RefreshApplicationPage(void)
Definition: applpage.c:247
unsigned long DWORD
Definition: ntddk_ex.h:95
#define LVS_ICON
Definition: commctrl.h:2231
#define ID_VIEW_SMALL
Definition: resource.h:36
#define GWL_STYLE
Definition: winuser.h:846
TASKMANAGER_SETTINGS TaskManagerSettings
Definition: taskmgr.c:52
#define SetWindowLongPtrW
Definition: winuser.h:5215
#define LVS_SMALLICON
Definition: commctrl.h:2233
#define ID_VIEW_LARGE
Definition: resource.h:35

Variable Documentation

◆ hApplicationPage

HWND hApplicationPage

Definition at line 34 of file applpage.c.

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

◆ hApplicationPageEndTaskButton

HWND hApplicationPageEndTaskButton

Definition at line 36 of file applpage.c.

◆ hApplicationPageListCtrl

HWND hApplicationPageListCtrl

Definition at line 35 of file applpage.c.

Referenced by TaskManager_OnTabWndSelChange(), and TaskManagerWndProc().

◆ hApplicationPageNewTaskButton

HWND hApplicationPageNewTaskButton

Definition at line 38 of file applpage.c.

◆ hApplicationPageSwitchToButton

HWND hApplicationPageSwitchToButton

Definition at line 37 of file applpage.c.