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
16e9237a
Commit
16e9237a
authored
May 18, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Francois Boisvert
System icons in the small caption bars are displayed with the right size.
parent
c654c7ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
12 deletions
+32
-12
nonclient.c
windows/nonclient.c
+32
-12
No files found.
windows/nonclient.c
View file @
16e9237a
...
...
@@ -1127,21 +1127,41 @@ static void NC_DrawCloseButton95 (HWND hwnd, HDC hdc, BOOL down, BOOL bGrayed)
NC_GetInsideRect95
(
hwnd
,
&
rect
);
hdcMem
=
CreateCompatibleDC
(
hdc
);
hBmp
=
down
?
hbitmapCloseD
:
hbitmapClose
;
hOldBmp
=
SelectObject
(
hdcMem
,
hBmp
);
GetObjectA
(
hBmp
,
sizeof
(
BITMAP
),
&
bmp
);
/* A tool window has a smaller Close button */
if
(
wndPtr
->
dwExStyle
&
WS_EX_TOOLWINDOW
)
{
RECT
toolRect
;
INT
iBmpHeight
=
11
;
/* Windows does not use SM_CXSMSIZE and SM_CYSMSIZE */
INT
iBmpWidth
=
11
;
/* it uses 11x11 for the close button in tool window */
INT
iCaptionHeight
=
GetSystemMetrics
(
SM_CYSMCAPTION
);
toolRect
.
top
=
rect
.
top
+
(
iCaptionHeight
-
1
-
iBmpHeight
)
/
2
;
toolRect
.
left
=
rect
.
right
-
(
iCaptionHeight
+
1
+
iBmpWidth
)
/
2
;
toolRect
.
bottom
=
toolRect
.
top
+
iBmpHeight
;
toolRect
.
right
=
toolRect
.
left
+
iBmpWidth
;
DrawFrameControl
(
hdc
,
&
toolRect
,
DFC_CAPTION
,
DFCS_CAPTIONCLOSE
|
down
?
DFCS_PUSHED
:
0
|
bGrayed
?
DFCS_INACTIVE
:
0
);
}
else
{
hdcMem
=
CreateCompatibleDC
(
hdc
);
hBmp
=
down
?
hbitmapCloseD
:
hbitmapClose
;
hOldBmp
=
SelectObject
(
hdcMem
,
hBmp
);
GetObjectA
(
hBmp
,
sizeof
(
BITMAP
),
&
bmp
);
BitBlt
(
hdc
,
rect
.
right
-
(
GetSystemMetrics
(
SM_CYCAPTION
)
+
1
+
bmp
.
bmWidth
)
/
2
,
rect
.
top
+
(
GetSystemMetrics
(
SM_CYCAPTION
)
-
1
-
bmp
.
bmHeight
)
/
2
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
hdcMem
,
0
,
0
,
SRCCOPY
);
BitBlt
(
hdc
,
rect
.
right
-
(
GetSystemMetrics
(
SM_CYCAPTION
)
+
1
+
bmp
.
bmWidth
)
/
2
,
rect
.
top
+
(
GetSystemMetrics
(
SM_CYCAPTION
)
-
1
-
bmp
.
bmHeight
)
/
2
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
hdcMem
,
0
,
0
,
SRCCOPY
);
if
(
bGrayed
)
NC_DrawGrayButton
(
hdc
,
rect
.
right
-
(
GetSystemMetrics
(
SM_CYCAPTION
)
+
1
+
bmp
.
bmWidth
)
/
2
+
2
,
rect
.
top
+
(
GetSystemMetrics
(
SM_CYCAPTION
)
-
1
-
bmp
.
bmHeight
)
/
2
+
2
);
if
(
bGrayed
)
NC_DrawGrayButton
(
hdc
,
rect
.
right
-
(
GetSystemMetrics
(
SM_CYCAPTION
)
+
1
+
bmp
.
bmWidth
)
/
2
+
2
,
rect
.
top
+
(
GetSystemMetrics
(
SM_CYCAPTION
)
-
1
-
bmp
.
bmHeight
)
/
2
+
2
);
SelectObject
(
hdcMem
,
hOldBmp
);
DeleteDC
(
hdcMem
);
SelectObject
(
hdcMem
,
hOldBmp
);
DeleteDC
(
hdcMem
);
}
}
WIN_ReleaseWndPtr
(
wndPtr
);
}
...
...
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