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
2d90c85a
Commit
2d90c85a
authored
Oct 25, 2008
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 27, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskmgr: HGDIOBJ is interchangeable with other handle types; no casts are needed.
parent
8ff77fce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
graphctl.c
programs/taskmgr/graphctl.c
+7
-7
taskmgr.c
programs/taskmgr/taskmgr.c
+1
-1
trayicon.c
programs/taskmgr/trayicon.c
+1
-1
No files found.
programs/taskmgr/graphctl.c
View file @
2d90c85a
...
...
@@ -210,7 +210,7 @@ void GraphCtrl_InvalidateCtrl(TGraphCtrl* this)
{
this
->
m_dcGrid
=
CreateCompatibleDC
(
dc
);
this
->
m_bitmapGrid
=
CreateCompatibleBitmap
(
dc
,
this
->
m_nClientWidth
,
this
->
m_nClientHeight
);
this
->
m_bitmapOldGrid
=
(
HBITMAP
)
SelectObject
(
this
->
m_dcGrid
,
this
->
m_bitmapGrid
);
this
->
m_bitmapOldGrid
=
SelectObject
(
this
->
m_dcGrid
,
this
->
m_bitmapGrid
);
}
SetBkColor
(
this
->
m_dcGrid
,
this
->
m_crBackColor
);
...
...
@@ -234,7 +234,7 @@ void GraphCtrl_InvalidateCtrl(TGraphCtrl* this)
this
->
m_nPlotWidth
=
this
->
m_rectPlot
.
right
-
this
->
m_rectPlot
.
left
;
/* m_rectPlot.Width(); */
/* draw the plot rectangle */
oldPen
=
(
HPEN
)
SelectObject
(
this
->
m_dcGrid
,
solidPen
);
oldPen
=
SelectObject
(
this
->
m_dcGrid
,
solidPen
);
MoveToEx
(
this
->
m_dcGrid
,
this
->
m_rectPlot
.
left
,
this
->
m_rectPlot
.
top
,
NULL
);
LineTo
(
this
->
m_dcGrid
,
this
->
m_rectPlot
.
right
+
1
,
this
->
m_rectPlot
.
top
);
LineTo
(
this
->
m_dcGrid
,
this
->
m_rectPlot
.
right
+
1
,
this
->
m_rectPlot
.
bottom
+
1
);
...
...
@@ -286,7 +286,7 @@ void GraphCtrl_InvalidateCtrl(TGraphCtrl* this)
DEFAULT_PITCH|FF_SWISS, "Arial");
/* grab the horizontal font */
oldFont =
(HFONT)
SelectObject(m_dcGrid, axisFont);
oldFont = SelectObject(m_dcGrid, axisFont);
/* y max */
SetTextColor(m_dcGrid, m_crGridColor);
...
...
@@ -317,7 +317,7 @@ void GraphCtrl_InvalidateCtrl(TGraphCtrl* this)
SelectObject(m_dcGrid, oldFont);
/* y units */
oldFont =
(HFONT)
SelectObject(m_dcGrid, yUnitFont);
oldFont = SelectObject(m_dcGrid, yUnitFont);
SetTextAlign(m_dcGrid, TA_CENTER|TA_BASELINE);
TextOut(m_dcGrid, (m_rectClient.left+m_rectPlot.left)/2,
(m_rectPlot.bottom+m_rectPlot.top)/2, m_strYUnitsString, _tcslen(m_strYUnitsString));
...
...
@@ -331,7 +331,7 @@ void GraphCtrl_InvalidateCtrl(TGraphCtrl* this)
{
this
->
m_dcPlot
=
CreateCompatibleDC
(
dc
);
this
->
m_bitmapPlot
=
CreateCompatibleBitmap
(
dc
,
this
->
m_nClientWidth
,
this
->
m_nClientHeight
);
this
->
m_bitmapOldPlot
=
(
HBITMAP
)
SelectObject
(
this
->
m_dcPlot
,
this
->
m_bitmapPlot
);
this
->
m_bitmapOldPlot
=
SelectObject
(
this
->
m_dcPlot
,
this
->
m_bitmapPlot
);
}
/* make sure the plot bitmap is cleared */
...
...
@@ -379,7 +379,7 @@ void GraphCtrl_Paint(TGraphCtrl* this, HWND hWnd, HDC dc)
/* and then BitBlt it to the client */
memDC
=
CreateCompatibleDC
(
dc
);
memBitmap
=
(
HBITMAP
)
CreateCompatibleBitmap
(
dc
,
this
->
m_nClientWidth
,
this
->
m_nClientHeight
);
oldBitmap
=
(
HBITMAP
)
SelectObject
(
memDC
,
memBitmap
);
oldBitmap
=
SelectObject
(
memDC
,
memBitmap
);
if
(
memDC
!=
NULL
)
{
...
...
@@ -434,7 +434,7 @@ void GraphCtrl_DrawPoint(TGraphCtrl* this)
for
(
i
=
0
;
i
<
MAX_PLOTS
;
i
++
)
{
/* grab the plotting pen */
oldPen
=
(
HPEN
)
SelectObject
(
this
->
m_dcPlot
,
this
->
m_penPlot
[
i
]);
oldPen
=
SelectObject
(
this
->
m_dcPlot
,
this
->
m_penPlot
[
i
]);
/* move to the previous point */
prevX
=
this
->
m_rectPlot
.
right
-
this
->
m_nPlotShiftPixels
;
...
...
programs/taskmgr/taskmgr.c
View file @
2d90c85a
...
...
@@ -97,7 +97,7 @@ void Font_DrawText(HDC hDC, LPWSTR lpwszText, int x, int y)
hFontDC
=
CreateCompatibleDC
(
hDC
);
hFontBitmap
=
LoadBitmap
(
hInst
,
MAKEINTRESOURCE
(
IDB_FONT
));
hOldBitmap
=
(
HBITMAP
)
SelectObject
(
hFontDC
,
hFontBitmap
);
hOldBitmap
=
SelectObject
(
hFontDC
,
hFontBitmap
);
for
(
i
=
0
;
lpwszText
[
i
];
i
++
)
{
if
((
lpwszText
[
i
]
>=
'0'
)
&&
(
lpwszText
[
i
]
<=
'9'
))
{
...
...
programs/taskmgr/trayicon.c
View file @
2d90c85a
...
...
@@ -78,7 +78,7 @@ HICON TrayIcon_GetProcessorUsageIcon(void)
* Select the bitmap into our device context
* so we can draw on it.
*/
hOldBitmap
=
(
HBITMAP
)
SelectObject
(
hDC
,
hBitmap
);
hOldBitmap
=
SelectObject
(
hDC
,
hBitmap
);
/*
* Get the cpu usage
...
...
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