Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5cd7f63f
Commit
5cd7f63f
authored
Apr 01, 2019
by
Michael Müller
Committed by
Alexandre Julliard
Apr 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskmgr: Use system font instead of special bitmap font.
Signed-off-by:
Vijay Kiran Kamuju
<
infyquest@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7bca617c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
35 deletions
+12
-35
font.bmp
programs/taskmgr/font.bmp
+0
-0
graph.c
programs/taskmgr/graph.c
+12
-2
resource.h
programs/taskmgr/resource.h
+0
-1
taskmgr.c
programs/taskmgr/taskmgr.c
+0
-29
taskmgr.rc
programs/taskmgr/taskmgr.rc
+0
-3
No files found.
programs/taskmgr/font.bmp
deleted
100644 → 0
View file @
7bca617c
646 Bytes
programs/taskmgr/graph.c
View file @
5cd7f63f
...
@@ -43,6 +43,7 @@ static void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
...
@@ -43,6 +43,7 @@ static void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
RECT
rcClient
;
RECT
rcClient
;
RECT
rcBarLeft
;
RECT
rcBarLeft
;
RECT
rcBarRight
;
RECT
rcBarRight
;
RECT
rcText
;
WCHAR
Text
[
256
];
WCHAR
Text
[
256
];
ULONG
CpuUsage
;
ULONG
CpuUsage
;
ULONG
CpuKernelUsage
;
ULONG
CpuKernelUsage
;
...
@@ -96,7 +97,11 @@ static void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
...
@@ -96,7 +97,11 @@ static void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
* Draw the font text onto the graph
* Draw the font text onto the graph
* The bottom 20 pixels are reserved for the text
* The bottom 20 pixels are reserved for the text
*/
*/
Font_DrawText
(
hDC
,
Text
,
((
rcClient
.
right
-
rcClient
.
left
)
-
32
)
/
2
,
rcClient
.
bottom
-
11
-
5
);
CopyRect
(
&
rcText
,
&
rcClient
);
rcText
.
top
=
rcText
.
bottom
-
19
;
SetTextColor
(
hDC
,
BRIGHT_GREEN
);
DrawTextW
(
hDC
,
Text
,
-
1
,
&
rcText
,
DT_CENTER
);
/*
/*
* Now we have to draw the graph
* Now we have to draw the graph
...
@@ -223,6 +228,7 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
...
@@ -223,6 +228,7 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
RECT
rcClient
;
RECT
rcClient
;
RECT
rcBarLeft
;
RECT
rcBarLeft
;
RECT
rcBarRight
;
RECT
rcBarRight
;
RECT
rcText
;
WCHAR
Text
[
256
];
WCHAR
Text
[
256
];
ULONGLONG
CommitChargeTotal
;
ULONGLONG
CommitChargeTotal
;
ULONGLONG
CommitChargeLimit
;
ULONGLONG
CommitChargeLimit
;
...
@@ -257,7 +263,11 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
...
@@ -257,7 +263,11 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
* Draw the font text onto the graph
* Draw the font text onto the graph
* The bottom 20 pixels are reserved for the text
* The bottom 20 pixels are reserved for the text
*/
*/
Font_DrawText
(
hDC
,
Text
,
((
rcClient
.
right
-
rcClient
.
left
)
-
(
lstrlenW
(
Text
)
*
8
))
/
2
,
rcClient
.
bottom
-
11
-
5
);
CopyRect
(
&
rcText
,
&
rcClient
);
rcText
.
top
=
rcText
.
bottom
-
19
;
SetTextColor
(
hDC
,
BRIGHT_GREEN
);
DrawTextW
(
hDC
,
Text
,
-
1
,
&
rcText
,
DT_CENTER
);
/*
/*
* Now we have to draw the graph
* Now we have to draw the graph
...
...
programs/taskmgr/resource.h
View file @
5cd7f63f
...
@@ -35,7 +35,6 @@
...
@@ -35,7 +35,6 @@
#define IDR_PROCESS_PAGE_CONTEXT 144
#define IDR_PROCESS_PAGE_CONTEXT 144
#define IDB_TRAYMASK 150
#define IDB_TRAYMASK 150
#define IDB_TRAYICON 153
#define IDB_TRAYICON 153
#define IDB_FONT 154
#define IDD_DEBUG_CHANNELS_DIALOG 155
#define IDD_DEBUG_CHANNELS_DIALOG 155
#define IDC_DEBUG_CHANNELS_LIST 156
#define IDC_DEBUG_CHANNELS_LIST 156
...
...
programs/taskmgr/taskmgr.c
View file @
5cd7f63f
...
@@ -76,35 +76,6 @@ static void Draw3dRect(HDC hDC, int x, int y, int cx, int cy, COLORREF clrTopLef
...
@@ -76,35 +76,6 @@ static void Draw3dRect(HDC hDC, int x, int y, int cx, int cy, COLORREF clrTopLef
FillSolidRect2
(
hDC
,
x
,
y
+
cy
,
cx
,
-
1
,
clrBottomRight
);
FillSolidRect2
(
hDC
,
x
,
y
+
cy
,
cx
,
-
1
,
clrBottomRight
);
}
}
void
Font_DrawText
(
HDC
hDC
,
LPWSTR
lpwszText
,
int
x
,
int
y
)
{
HDC
hFontDC
;
HBITMAP
hFontBitmap
;
HBITMAP
hOldBitmap
;
int
i
;
hFontDC
=
CreateCompatibleDC
(
hDC
);
hFontBitmap
=
LoadBitmapW
(
hInst
,
MAKEINTRESOURCEW
(
IDB_FONT
));
hOldBitmap
=
SelectObject
(
hFontDC
,
hFontBitmap
);
for
(
i
=
0
;
lpwszText
[
i
];
i
++
)
{
if
((
lpwszText
[
i
]
>=
'0'
)
&&
(
lpwszText
[
i
]
<=
'9'
))
{
BitBlt
(
hDC
,
x
+
(
i
*
8
),
y
,
8
,
11
,
hFontDC
,
(
lpwszText
[
i
]
-
'0'
)
*
8
,
0
,
SRCCOPY
);
}
else
if
(
lpwszText
[
i
]
==
'K'
)
{
BitBlt
(
hDC
,
x
+
(
i
*
8
),
y
,
8
,
11
,
hFontDC
,
80
,
0
,
SRCCOPY
);
}
else
if
(
lpwszText
[
i
]
==
'%'
)
{
BitBlt
(
hDC
,
x
+
(
i
*
8
),
y
,
8
,
11
,
hFontDC
,
88
,
0
,
SRCCOPY
);
}
}
SelectObject
(
hFontDC
,
hOldBitmap
);
DeleteObject
(
hFontBitmap
);
DeleteDC
(
hFontDC
);
}
static
BOOL
OnCreate
(
HWND
hWnd
)
static
BOOL
OnCreate
(
HWND
hWnd
)
{
{
HMENU
hMenu
;
HMENU
hMenu
;
...
...
programs/taskmgr/taskmgr.rc
View file @
5cd7f63f
...
@@ -609,6 +609,3 @@ IDB_TRAYMASK BITMAP traymask.bmp
...
@@ -609,6 +609,3 @@ IDB_TRAYMASK BITMAP traymask.bmp
/* @makedep: trayicon.bmp */
/* @makedep: trayicon.bmp */
IDB_TRAYICON BITMAP trayicon.bmp
IDB_TRAYICON BITMAP trayicon.bmp
/* @makedep: font.bmp */
IDB_FONT BITMAP font.bmp
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