ReactOS 0.4.15-dev-7934-g1dc8d80
column.c File Reference
#include "precomp.h"
Include dependency graph for column.c:

Go to the source code of this file.

Macros

#define DECLARE_COLUMN_PRESET(_name, _size, _state)    { IDS_TAB_##_name, IDC_##_name, _size, _state },
 

Functions

static int InsertColumn (int nCol, LPCWSTR lpszColumnHeading, int nFormat, int nWidth, int nSubItem)
 
INT_PTR CALLBACK ColumnsDialogWndProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
void AddColumns (void)
 
void SaveColumnSettings (void)
 
void ProcessPage_OnViewSelectColumns (void)
 
void UpdateColumnDataHints (void)
 

Variables

UINT ColumnDataHints [COLUMN_NMAX]
 
const PresetColumnEntry ColumnPresets [COLUMN_NMAX]
 

Macro Definition Documentation

◆ DECLARE_COLUMN_PRESET

#define DECLARE_COLUMN_PRESET (   _name,
  _size,
  _state 
)     { IDS_TAB_##_name, IDC_##_name, _size, _state },

Definition at line 13 of file column.c.

Function Documentation

◆ AddColumns()

void AddColumns ( void  )

Definition at line 48 of file column.c.

49{
51 WCHAR szTemp[256];
52 unsigned int n;
53
54 for (n=0; n<COLUMN_NMAX; n++) {
56 LoadStringW(hInst, ColumnPresets[n].dwIdsName, szTemp, _countof(szTemp));
58 }
59 }
60
63
65}
const PresetColumnEntry ColumnPresets[COLUMN_NMAX]
Definition: column.c:16
static int InsertColumn(int nCol, LPCWSTR lpszColumnHeading, int nFormat, int nWidth, int nSubItem)
Definition: column.c:67
void UpdateColumnDataHints(void)
Definition: column.c:186
#define COLUMN_NMAX
Definition: column.h:37
HINSTANCE hInst
Definition: dxdiag.c:13
GLsizeiptr size
Definition: glext.h:5919
GLdouble n
Definition: glext.h:7729
HWND hProcessPageHeaderCtrl
Definition: procpage.c:29
#define HDM_SETORDERARRAY
Definition: commctrl.h:809
#define HDM_GETITEMCOUNT
Definition: commctrl.h:733
#define LVCFMT_LEFT
Definition: commctrl.h:2598
#define _countof(array)
Definition: sndvol32.h:68
int ColumnSizeArray[COLUMN_NMAX]
Definition: taskmgr.h:49
int ColumnOrderArray[COLUMN_NMAX]
Definition: taskmgr.h:48
BOOL Columns[COLUMN_NMAX]
Definition: taskmgr.h:47
TASKMANAGER_SETTINGS TaskManagerSettings
Definition: taskmgr.c:37
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by MainPageProc(), ProcessPage_OnViewSelectColumns(), and ProcessPageWndProc().

◆ ColumnsDialogWndProc()

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

Definition at line 151 of file column.c.

152{
153 unsigned int i;
154
155 switch (message)
156 {
157 case WM_INITDIALOG:
158 for (i=0; i<COLUMN_NMAX; i++) {
160 CheckDlgButton(hDlg, ColumnPresets[i].dwIdcCtrl, BST_CHECKED);
161 }
162 return TRUE;
163
164 case WM_COMMAND:
165 if (LOWORD(wParam) == IDCANCEL)
166 {
167 EndDialog(hDlg, LOWORD(wParam));
168 return TRUE;
169 }
170
171 if (LOWORD(wParam) == IDOK)
172 {
173 for (i=0; i<COLUMN_NMAX; i++)
175
176 EndDialog(hDlg, LOWORD(wParam));
177 return TRUE;
178 }
179
180 break;
181 }
182
183 return 0;
184}
WPARAM wParam
Definition: combotst.c:138
#define TRUE
Definition: types.h:120
unsigned int BOOL
Definition: ntddk_ex.h:94
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
Definition: glfuncs.h:248
#define LOWORD(l)
Definition: pedump.c:82
Definition: tftpd.h:60
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define IDCANCEL
Definition: winuser.h:831
#define WM_COMMAND
Definition: winuser.h:1740
#define WM_INITDIALOG
Definition: winuser.h:1739
#define IDOK
Definition: winuser.h:830
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
#define BST_CHECKED
Definition: winuser.h:197
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)

Referenced by ProcessPage_OnViewSelectColumns().

◆ InsertColumn()

static int InsertColumn ( int  nCol,
LPCWSTR  lpszColumnHeading,
int  nFormat,
int  nWidth,
int  nSubItem 
)
static

Definition at line 67 of file column.c.

68{
70
72 column.pszText = (LPWSTR)lpszColumnHeading;
73 column.fmt = nFormat;
74
75 if (nWidth != -1)
76 {
77 column.mask |= LVCF_WIDTH;
78 column.cx = nWidth;
79 }
80
81 if (nSubItem != -1)
82 {
83 column.mask |= LVCF_SUBITEM;
84 column.iSubItem = nSubItem;
85 }
86
88}
HWND hProcessPageListCtrl
Definition: procpage.c:28
#define ListView_InsertColumn(hwnd, iCol, pcol)
Definition: commctrl.h:2636
#define LVCF_WIDTH
Definition: commctrl.h:2587
#define LVCF_FMT
Definition: commctrl.h:2586
#define LVCF_SUBITEM
Definition: commctrl.h:2589
#define LVCF_TEXT
Definition: commctrl.h:2588
#define LVCOLUMN
Definition: commctrl.h:2581
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by AddColumns(), and CACListView::Create().

◆ ProcessPage_OnViewSelectColumns()

void ProcessPage_OnViewSelectColumns ( void  )

Definition at line 130 of file column.c.

131{
132 int i;
133
135 {
137 {
139 }
140
141 for (i=0; i<COLUMN_NMAX; i++) {
144 }
145
146 AddColumns();
147 }
148}
#define IDD_COLUMNS_DIALOG
Definition: resource.h:31
INT_PTR CALLBACK ColumnsDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Definition: column.c:151
void AddColumns(void)
Definition: column.c:48
HWND hMainWnd
Definition: magnifier.c:32
#define ListView_DeleteColumn(hwnd, iCol)
Definition: commctrl.h:2639
#define Header_GetItemCount(hwndHD)
Definition: commctrl.h:734
#define DialogBoxW(i, t, p, f)
Definition: winuser.h:4399
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

Referenced by TaskManagerWndProc().

◆ SaveColumnSettings()

void SaveColumnSettings ( void  )

Definition at line 90 of file column.c.

91{
92 HDITEM hditem;
93 int i, n;
94 WCHAR text[260];
95 WCHAR szTemp[256];
97
98 /* Reset column data */
99 for (i=0; i<COLUMN_NMAX; i++) {
103 }
104
105 /* Get header order */
108
109 /* Get visible columns */
110 for (i = 0; i < SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEMCOUNT, 0, 0); i++) {
111 memset(&hditem, 0, sizeof(HDITEM));
112
113 hditem.mask = HDI_TEXT|HDI_WIDTH;
114 hditem.pszText = text;
115 hditem.cchTextMax = 260;
116
118
119 for (n = 0; n < COLUMN_NMAX; n++) {
120 LoadStringW(hInst, ColumnPresets[n].dwIdsName, szTemp, _countof(szTemp));
121 if (_wcsicmp(text, szTemp) == 0)
122 {
125 }
126 }
127 }
128}
#define FALSE
Definition: types.h:117
const WCHAR * text
Definition: package.c:1799
#define HDI_TEXT
Definition: commctrl.h:704
#define HDI_WIDTH
Definition: commctrl.h:702
#define HDM_GETORDERARRAY
Definition: commctrl.h:806
#define HDITEM
Definition: commctrl.h:697
#define HDM_GETITEM
Definition: commctrl.h:749
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define memset(x, y, z)
Definition: compat.h:39

Referenced by ProcessPageWndProc().

◆ UpdateColumnDataHints()

void UpdateColumnDataHints ( void  )

Definition at line 186 of file column.c.

187{
188 HDITEM hditem;
189 WCHAR text[260];
190 ULONG Index;
191 ULONG uItems;
192 WCHAR szTemp[256];
193 UINT i;
194
196
197 for (Index=0; Index<uItems; Index++)
198 {
199 memset(&hditem, 0, sizeof(HDITEM));
200
201 hditem.mask = HDI_TEXT;
202 hditem.pszText = text;
203 hditem.cchTextMax = 260;
204
206
207 for (i=0; i<COLUMN_NMAX; i++) {
208 LoadStringW(hInst, ColumnPresets[i].dwIdsName, szTemp, _countof(szTemp));
209 if (_wcsicmp(text, szTemp) == 0)
211 }
212 }
213}
UINT ColumnDataHints[COLUMN_NMAX]
Definition: column.c:11
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50
uint32_t ULONG
Definition: typedefs.h:59
_In_ WDFCOLLECTION _In_ ULONG Index

Referenced by AddColumns(), and ProcessPageOnNotify().

Variable Documentation

◆ ColumnDataHints

UINT ColumnDataHints[COLUMN_NMAX]

Definition at line 11 of file column.c.

Referenced by PerfDataGetText(), ProcessPageOnNotify(), and UpdateColumnDataHints().

◆ ColumnPresets