ReactOS 0.4.15-dev-8135-g1bc6c90
optnmenu.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Task Manager
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: Menu item handlers for the options menu.
5 * COPYRIGHT: Copyright 1999-2001 Brian Palmer <brianp@reactos.org>
6 */
7
8#include "precomp.h"
9
11{
12 HMENU hMenu;
13 HMENU hOptionsMenu;
14
15 hMenu = GetMenu(hMainWnd);
16 hOptionsMenu = GetSubMenu(hMenu, OPTIONS_MENU_INDEX);
17
18 /*
19 * Check or uncheck the always on top menu item
20 * and update main window.
21 */
23 {
27 }
28 else
29 {
33 }
34}
35
37{
38 HMENU hMenu;
39 HMENU hOptionsMenu;
40
41 hMenu = GetMenu(hMainWnd);
42 hOptionsMenu = GetSubMenu(hMenu, OPTIONS_MENU_INDEX);
43
44 /*
45 * Check or uncheck the minimize on use menu item.
46 */
48 {
51 }
52 else
53 {
56 }
57}
58
60{
61 HMENU hMenu;
62 HMENU hOptionsMenu;
63
64 hMenu = GetMenu(hMainWnd);
65 hOptionsMenu = GetSubMenu(hMenu, OPTIONS_MENU_INDEX);
66
67 /*
68 * Check or uncheck the hide when minimized menu item.
69 */
71 {
74 }
75 else
76 {
79 }
80}
81
83{
84 HMENU hMenu;
85 HMENU hOptionsMenu;
86
87 hMenu = GetMenu(hMainWnd);
88 hOptionsMenu = GetSubMenu(hMenu, OPTIONS_MENU_INDEX);
89
90 /*
91 * FIXME: Currently this is useless because the
92 * current implementation doesn't list the 16-bit
93 * processes. I believe that would require querying
94 * each ntvdm.exe process for it's children.
95 */
96
97 /*
98 * Check or uncheck the show 16-bit tasks menu item
99 */
101 {
104 }
105 else
106 {
109 }
110
111 /*
112 * Refresh the list of processes.
113 */
115}
#define ID_OPTIONS_ALWAYSONTOP
Definition: resource.h:143
#define ID_OPTIONS_MINIMIZEONUSE
Definition: resource.h:144
#define ID_OPTIONS_SHOW16BITTASKS
Definition: resource.h:163
#define ID_OPTIONS_HIDEWHENMINIMIZED
Definition: resource.h:145
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HWND hMainWnd
Definition: magnifier.c:32
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
void TaskManager_OnOptionsAlwaysOnTop(void)
Definition: optnmenu.c:10
void TaskManager_OnOptionsHideWhenMinimized(void)
Definition: optnmenu.c:59
void TaskManager_OnOptionsShow16BitTasks(void)
Definition: optnmenu.c:82
void TaskManager_OnOptionsMinimizeOnUse(void)
Definition: optnmenu.c:36
#define OPTIONS_MENU_INDEX
Definition: optnmenu.h:10
#define WS_EX_TOPMOST
Definition: pedump.c:647
void RefreshProcessPage(void)
Definition: procpage.c:448
BOOL HideWhenMinimized
Definition: taskmgr.h:36
TASKMANAGER_SETTINGS TaskManagerSettings
Definition: taskmgr.c:37
#define MF_BYCOMMAND
Definition: winuser.h:202
#define GetWindowLongPtrW
Definition: winuser.h:4829
UINT WINAPI GetMenuState(_In_ HMENU, _In_ UINT, _In_ UINT)
#define HWND_TOPMOST
Definition: winuser.h:1208
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOMOVE
Definition: winuser.h:1244
#define MF_CHECKED
Definition: winuser.h:132
#define SWP_NOSIZE
Definition: winuser.h:1245
#define MF_UNCHECKED
Definition: winuser.h:204
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define HWND_NOTOPMOST
Definition: winuser.h:1206
HMENU WINAPI GetMenu(_In_ HWND)
#define GWL_EXSTYLE
Definition: winuser.h:851