Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e5072fa6
Commit
e5072fa6
authored
May 17, 2011
by
Andrew Nguyen
Committed by
Alexandre Julliard
May 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskmgr: Remove all TCHAR macro usage in tab page code.
parent
a12ed578
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
19 deletions
+21
-19
applpage.c
programs/taskmgr/applpage.c
+0
-0
perfpage.c
programs/taskmgr/perfpage.c
+6
-6
procpage.c
programs/taskmgr/procpage.c
+15
-13
No files found.
programs/taskmgr/applpage.c
View file @
e5072fa6
This diff is collapsed.
Click to expand it.
programs/taskmgr/perfpage.c
View file @
e5072fa6
...
@@ -146,7 +146,7 @@ static DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
...
@@ -146,7 +146,7 @@ static DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
LoadStringW
(
hInst
,
IDS_STATUS_BAR_MEMORY_USAGE
,
wszMemUsage
,
sizeof
(
wszMemUsage
)
/
sizeof
(
WCHAR
));
LoadStringW
(
hInst
,
IDS_STATUS_BAR_MEMORY_USAGE
,
wszMemUsage
,
sizeof
(
wszMemUsage
)
/
sizeof
(
WCHAR
));
/* Create the event */
/* Create the event */
hPerformancePageEvent
=
CreateEvent
(
NULL
,
TRUE
,
TRUE
,
NULL
);
hPerformancePageEvent
=
CreateEvent
W
(
NULL
,
TRUE
,
TRUE
,
NULL
);
/* If we couldn't create the event then exit the thread */
/* If we couldn't create the event then exit the thread */
if
(
!
hPerformancePageEvent
)
if
(
!
hPerformancePageEvent
)
...
@@ -344,11 +344,11 @@ PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
...
@@ -344,11 +344,11 @@ PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
/*
/*
* Subclass graph buttons
* Subclass graph buttons
*/
*/
OldGraphWndProc
=
(
WNDPROC
)
SetWindowLongPtr
(
hPerformancePageCpuUsageGraph
,
GWLP_WNDPROC
,
(
LONG_PTR
)
Graph_WndProc
);
OldGraphWndProc
=
(
WNDPROC
)
SetWindowLongPtr
W
(
hPerformancePageCpuUsageGraph
,
GWLP_WNDPROC
,
(
LONG_PTR
)
Graph_WndProc
);
SetWindowLongPtr
(
hPerformancePageMemUsageGraph
,
GWLP_WNDPROC
,
(
LONG_PTR
)
Graph_WndProc
);
SetWindowLongPtr
W
(
hPerformancePageMemUsageGraph
,
GWLP_WNDPROC
,
(
LONG_PTR
)
Graph_WndProc
);
OldGraphCtrlWndProc
=
(
WNDPROC
)
SetWindowLongPtr
(
hPerformancePageMemUsageHistoryGraph
,
GWLP_WNDPROC
,
(
LONG_PTR
)
GraphCtrl_WndProc
);
OldGraphCtrlWndProc
=
(
WNDPROC
)
SetWindowLongPtrW
(
hPerformancePageMemUsageHistoryGraph
,
GWLP_WNDPROC
,
(
LONG_PTR
)
GraphCtrl_WndProc
);
SetWindowLongPtr
(
hPerformancePageCpuUsageHistoryGraph
,
GWLP_WNDPROC
,
(
LONG_PTR
)
GraphCtrl_WndProc
);
SetWindowLongPtrW
(
hPerformancePageCpuUsageHistoryGraph
,
GWLP_WNDPROC
,
(
LONG_PTR
)
GraphCtrl_WndProc
);
return
TRUE
;
return
TRUE
;
case
WM_COMMAND
:
case
WM_COMMAND
:
break
;
break
;
...
...
programs/taskmgr/procpage.c
View file @
e5072fa6
...
@@ -89,7 +89,7 @@ static void ProcessPageShowContextMenu(DWORD dwProcessId)
...
@@ -89,7 +89,7 @@ static void ProcessPageShowContextMenu(DWORD dwProcessId)
GetCursorPos
(
&
pt
);
GetCursorPos
(
&
pt
);
GetSystemInfo
(
&
si
);
GetSystemInfo
(
&
si
);
hMenu
=
LoadMenu
(
hInst
,
MAKEINTRESOURCE
(
IDR_PROCESS_PAGE_CONTEXT
));
hMenu
=
LoadMenu
W
(
hInst
,
MAKEINTRESOURCEW
(
IDR_PROCESS_PAGE_CONTEXT
));
hSubMenu
=
GetSubMenu
(
hMenu
,
0
);
hSubMenu
=
GetSubMenu
(
hMenu
,
0
);
hPriorityMenu
=
GetSubMenu
(
hSubMenu
,
4
);
hPriorityMenu
=
GetSubMenu
(
hSubMenu
,
4
);
...
@@ -152,8 +152,8 @@ static void ProcessPageOnNotify(LPARAM lParam)
...
@@ -152,8 +152,8 @@ static void ProcessPageOnNotify(LPARAM lParam)
{
{
LPNMHDR
pnmh
;
LPNMHDR
pnmh
;
NMLVDISPINFOW
*
pnmdi
;
NMLVDISPINFOW
*
pnmdi
;
LVITEM
lvitem
;
LVITEM
W
lvitem
;
ULONG
Index
;
ULONG
Index
,
Count
;
ULONG
ColumnIndex
;
ULONG
ColumnIndex
;
IO_COUNTERS
iocounters
;
IO_COUNTERS
iocounters
;
TIME
time
;
TIME
time
;
...
@@ -321,21 +321,21 @@ static void ProcessPageOnNotify(LPARAM lParam)
...
@@ -321,21 +321,21 @@ static void ProcessPageOnNotify(LPARAM lParam)
break
;
break
;
case
NM_RCLICK
:
case
NM_RCLICK
:
Count
=
SendMessageW
(
hProcessPageListCtrl
,
LVM_GETITEMCOUNT
,
0
,
0
);
for
(
Index
=
0
;
Index
<
(
ULONG
)
ListView_GetItemCount
(
hProcessPageListCtrl
)
;
Index
++
)
for
(
Index
=
0
;
Index
<
Count
;
Index
++
)
{
{
lvitem
.
mask
=
LVIF_STATE
;
lvitem
.
mask
=
LVIF_STATE
;
lvitem
.
stateMask
=
LVIS_SELECTED
;
lvitem
.
stateMask
=
LVIS_SELECTED
;
lvitem
.
iItem
=
Index
;
lvitem
.
iItem
=
Index
;
lvitem
.
iSubItem
=
0
;
lvitem
.
iSubItem
=
0
;
SendMessage
(
hProcessPageListCtrl
,
LVM_GETITEM
,
0
,
(
LPARAM
)
&
lvitem
);
SendMessage
W
(
hProcessPageListCtrl
,
LVM_GETITEMW
,
0
,
(
LPARAM
)
&
lvitem
);
if
(
lvitem
.
state
&
LVIS_SELECTED
)
if
(
lvitem
.
state
&
LVIS_SELECTED
)
break
;
break
;
}
}
if
((
ListView_GetSelectedCount
(
hProcessPageListCtrl
)
==
1
)
&&
if
((
SendMessageW
(
hProcessPageListCtrl
,
LVM_GETSELECTEDCOUNT
,
0
,
0
)
==
1
)
&&
(
PerfDataGetProcessId
(
Index
)
!=
0
))
(
PerfDataGetProcessId
(
Index
)
!=
0
))
{
{
ProcessPageShowContextMenu
(
PerfDataGetProcessId
(
Index
));
ProcessPageShowContextMenu
(
PerfDataGetProcessId
(
Index
));
...
@@ -396,7 +396,7 @@ static DWORD WINAPI ProcessPageRefreshThread(void *lpParameter)
...
@@ -396,7 +396,7 @@ static DWORD WINAPI ProcessPageRefreshThread(void *lpParameter)
LoadStringW
(
hInst
,
IDS_STATUS_BAR_PROCESSES
,
wszProcesses
,
sizeof
(
wszProcesses
)
/
sizeof
(
WCHAR
));
LoadStringW
(
hInst
,
IDS_STATUS_BAR_PROCESSES
,
wszProcesses
,
sizeof
(
wszProcesses
)
/
sizeof
(
WCHAR
));
/* Create the event */
/* Create the event */
hProcessPageEvent
=
CreateEvent
(
NULL
,
TRUE
,
TRUE
,
NULL
);
hProcessPageEvent
=
CreateEvent
W
(
NULL
,
TRUE
,
TRUE
,
NULL
);
/* If we couldn't create the event then exit the thread */
/* If we couldn't create the event then exit the thread */
if
(
!
hProcessPageEvent
)
if
(
!
hProcessPageEvent
)
...
@@ -419,8 +419,8 @@ static DWORD WINAPI ProcessPageRefreshThread(void *lpParameter)
...
@@ -419,8 +419,8 @@ static DWORD WINAPI ProcessPageRefreshThread(void *lpParameter)
/* Reset our event */
/* Reset our event */
ResetEvent
(
hProcessPageEvent
);
ResetEvent
(
hProcessPageEvent
);
if
(
(
ULONG
)
SendMessage
(
hProcessPageListCtrl
,
LVM_GETITEMCOUNT
,
0
,
0
)
!=
PerfDataGetProcessCount
())
if
(
SendMessageW
(
hProcessPageListCtrl
,
LVM_GETITEMCOUNT
,
0
,
0
)
!=
PerfDataGetProcessCount
())
SendMessage
(
hProcessPageListCtrl
,
LVM_SETITEMCOUNT
,
PerfDataGetProcessCount
(),
/*LVSICF_NOINVALIDATEALL|*/
LVSICF_NOSCROLL
);
SendMessage
W
(
hProcessPageListCtrl
,
LVM_SETITEMCOUNT
,
PerfDataGetProcessCount
(),
/*LVSICF_NOINVALIDATEALL|*/
LVSICF_NOSCROLL
);
if
(
IsWindowVisible
(
hProcessPage
))
if
(
IsWindowVisible
(
hProcessPage
))
InvalidateRect
(
hProcessPageListCtrl
,
NULL
,
FALSE
);
InvalidateRect
(
hProcessPageListCtrl
,
NULL
,
FALSE
);
...
@@ -447,6 +447,7 @@ ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
...
@@ -447,6 +447,7 @@ ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
int
nXDifference
;
int
nXDifference
;
int
nYDifference
;
int
nYDifference
;
int
cx
,
cy
;
int
cx
,
cy
;
DWORD
extended_styles
;
switch
(
message
)
{
switch
(
message
)
{
case
WM_INITDIALOG
:
case
WM_INITDIALOG
:
...
@@ -464,21 +465,22 @@ ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
...
@@ -464,21 +465,22 @@ ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
* Get handles to the controls
* Get handles to the controls
*/
*/
hProcessPageListCtrl
=
GetDlgItem
(
hDlg
,
IDC_PROCESSLIST
);
hProcessPageListCtrl
=
GetDlgItem
(
hDlg
,
IDC_PROCESSLIST
);
hProcessPageHeaderCtrl
=
ListView_GetHeader
(
hProcessPageListCtrl
);
hProcessPageHeaderCtrl
=
(
HWND
)
SendMessageW
(
hProcessPageListCtrl
,
LVM_GETHEADER
,
0
,
0
);
hProcessPageEndProcessButton
=
GetDlgItem
(
hDlg
,
IDC_ENDPROCESS
);
hProcessPageEndProcessButton
=
GetDlgItem
(
hDlg
,
IDC_ENDPROCESS
);
hProcessPageShowAllProcessesButton
=
GetDlgItem
(
hDlg
,
IDC_SHOWALLPROCESSES
);
hProcessPageShowAllProcessesButton
=
GetDlgItem
(
hDlg
,
IDC_SHOWALLPROCESSES
);
/*
/*
* Set the extended window styles for the list control
* Set the extended window styles for the list control
*/
*/
SendMessage
(
hProcessPageListCtrl
,
LVM_SETEXTENDEDLISTVIEWSTYLE
,
0
,
ListView_GetExtendedListViewStyle
(
hProcessPageListCtrl
)
|
LVS_EX_FULLROWSELECT
|
LVS_EX_HEADERDRAGDROP
);
extended_styles
=
SendMessageW
(
hProcessPageListCtrl
,
LVM_GETEXTENDEDLISTVIEWSTYLE
,
0
,
0
);
SendMessageW
(
hProcessPageListCtrl
,
LVM_SETEXTENDEDLISTVIEWSTYLE
,
0
,
extended_styles
|
LVS_EX_FULLROWSELECT
|
LVS_EX_HEADERDRAGDROP
);
AddColumns
();
AddColumns
();
/*
/*
* Subclass the process list control so we can intercept WM_ERASEBKGND
* Subclass the process list control so we can intercept WM_ERASEBKGND
*/
*/
OldProcessListWndProc
=
(
WNDPROC
)
SetWindowLongPtr
(
hProcessPageListCtrl
,
GWLP_WNDPROC
,
(
LONG_PTR
)
ProcessListWndProc
);
OldProcessListWndProc
=
(
WNDPROC
)
SetWindowLongPtr
W
(
hProcessPageListCtrl
,
GWLP_WNDPROC
,
(
LONG_PTR
)
ProcessListWndProc
);
/* Start our refresh thread */
/* Start our refresh thread */
CreateThread
(
NULL
,
0
,
ProcessPageRefreshThread
,
NULL
,
0
,
NULL
);
CreateThread
(
NULL
,
0
,
ProcessPageRefreshThread
,
NULL
,
0
,
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment