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
bfd02281
Commit
bfd02281
authored
Jan 20, 1999
by
Noomen Hamza
Committed by
Alexandre Julliard
Jan 20, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the NC_DrawMaxButton95 and NC_DrawMinButton95 functions. Rewrote
these functions with the same logic as the NC_DrawCloseButton function.
parent
463eb294
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
46 deletions
+36
-46
nonclient.c
windows/nonclient.c
+36
-46
No files found.
windows/nonclient.c
View file @
bfd02281
...
...
@@ -1050,8 +1050,7 @@ NC_DrawSysButton95 (HWND32 hwnd, HDC32 hdc, BOOL32 down)
*
*****************************************************************************/
void
NC_DrawCloseButton95
(
HWND32
hwnd
,
HDC32
hdc
,
BOOL32
down
)
void
NC_DrawCloseButton95
(
HWND32
hwnd
,
HDC32
hdc
,
BOOL32
down
)
{
RECT32
rect
;
HDC32
hdcMem
;
...
...
@@ -1065,7 +1064,7 @@ NC_DrawCloseButton95 (HWND32 hwnd, HDC32 hdc, BOOL32 down)
NC_GetInsideRect95
(
hwnd
,
&
rect
);
hdcMem
=
CreateCompatibleDC32
(
hdc
);
hBmp
=
/*down ? hbitmapCloseD :*/
hbitmapClose
;
hBmp
=
down
?
hbitmapCloseD
:
hbitmapClose
;
hOldBmp
=
SelectObject32
(
hdcMem
,
hBmp
);
GetObject32A
(
hBmp
,
sizeof
(
BITMAP32
),
&
bmp
);
BitBlt32
(
hdc
,
rect
.
right
-
(
sysMetrics
[
SM_CYCAPTION
]
+
1
+
bmp
.
bmWidth
)
/
2
,
...
...
@@ -1077,7 +1076,6 @@ NC_DrawCloseButton95 (HWND32 hwnd, HDC32 hdc, BOOL32 down)
}
}
/******************************************************************************
*
* NC_DrawMaxButton95(
...
...
@@ -1098,40 +1096,36 @@ NC_DrawCloseButton95 (HWND32 hwnd, HDC32 hdc, BOOL32 down)
*
*****************************************************************************/
static
void
NC_DrawMaxButton95
(
HWND32
hwnd
,
HDC16
hdc
,
BOOL32
down
)
static
void
NC_DrawMaxButton95
(
HWND32
hwnd
,
HDC16
hdc
,
BOOL32
down
)
{
RECT32
rect
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
SIZE32
bmsz
;
HBITMAP32
bm
;
HDC32
hdcMem
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
if
(
!
(
wndPtr
->
flags
&
WIN_MANAGED
)
&&
GetBitmapDimensionEx32
((
bm
=
IsZoomed32
(
hwnd
)
?
(
down
?
hbitmapRestoreD
:
hbitmapRestore
)
:
(
down
?
hbitmapMaximizeD
:
hbitmapMaximize
)),
&
bmsz
))
{
if
(
!
(
wndPtr
->
flags
&
WIN_MANAGED
))
{
BITMAP32
bmp
;
HBITMAP32
hBmp
,
hOldBmp
;
NC_GetInsideRect95
(
hwnd
,
&
rect
);
hdcMem
=
CreateCompatibleDC32
(
hdc
);
hBmp
=
IsZoomed32
(
hwnd
)
?
(
down
?
hbitmapRestoreD
:
hbitmapRestore
)
:
(
down
?
hbitmapMaximizeD
:
hbitmapMaximize
);
hOldBmp
=
SelectObject32
(
hdcMem
,
hBmp
);
GetObject32A
(
hBmp
,
sizeof
(
BITMAP32
),
&
bmp
);
if
(
wndPtr
->
dwStyle
&
WS_SYSMENU
)
rect
.
right
-=
sysMetrics
[
SM_CYCAPTION
]
+
1
;
hdcMem
=
CreateCompatibleDC32
(
hdc
);
SelectObject32
(
hdc
,
bm
);
BitBlt32
(
hdc
,
rect
.
right
-
(
sysMetrics
[
SM_CXSIZE
]
+
bmsz
.
cx
)
/
2
,
rect
.
top
+
(
sysMetrics
[
SM_CYCAPTION
]
-
1
-
bmsz
.
cy
)
/
2
,
bmsz
.
cx
,
bmsz
.
cy
,
hdcMem
,
0
,
0
,
SRCCOPY
);
BitBlt32
(
hdc
,
rect
.
right
-
(
sysMetrics
[
SM_CXSIZE
]
+
bmp
.
bmWidth
)
/
2
,
rect
.
top
+
(
sysMetrics
[
SM_CYCAPTION
]
-
1
-
bmp
.
bmHeight
)
/
2
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
hdcMem
,
0
,
0
,
SRCCOPY
);
SelectObject32
(
hdcMem
,
hOldBmp
);
DeleteDC32
(
hdcMem
);
}
return
;
}
/******************************************************************************
*
* NC_DrawMinButton95(
...
...
@@ -1151,42 +1145,40 @@ static void NC_DrawMaxButton95(
*
*****************************************************************************/
static
void
NC_DrawMinButton95
(
HWND32
hwnd
,
HDC16
hdc
,
BOOL32
down
)
static
void
NC_DrawMinButton95
(
HWND32
hwnd
,
HDC16
hdc
,
BOOL32
down
)
{
RECT32
rect
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
SIZE32
bmsz
;
HBITMAP32
bm
;
HDC32
hdcMem
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
if
(
!
(
wndPtr
->
flags
&
WIN_MANAGED
)
&&
GetBitmapDimensionEx32
((
bm
=
down
?
hbitmapMinimizeD
:
hbitmapMinimize
),
&
bmsz
))
{
if
(
!
(
wndPtr
->
flags
&
WIN_MANAGED
))
{
BITMAP32
bmp
;
HBITMAP32
hBmp
,
hOldBmp
;
NC_GetInsideRect95
(
hwnd
,
&
rect
);
hdcMem
=
CreateCompatibleDC32
(
hdc
);
hBmp
=
down
?
hbitmapMinimizeD
:
hbitmapMinimize
;
hOldBmp
=
SelectObject32
(
hdcMem
,
hBmp
);
GetObject32A
(
hBmp
,
sizeof
(
BITMAP32
),
&
bmp
);
if
(
wndPtr
->
dwStyle
&
WS_SYSMENU
)
rect
.
right
-=
sysMetrics
[
SM_CYCAPTION
]
+
1
;
if
(
wndPtr
->
dwStyle
&
WS_MAXIMIZEBOX
)
rect
.
right
+=
-
1
-
(
sysMetrics
[
SM_CXSIZE
]
+
bmsz
.
cx
)
/
2
;
rect
.
right
+=
-
1
-
(
sysMetrics
[
SM_CXSIZE
]
+
bmp
.
bmWidth
)
/
2
;
hdcMem
=
CreateCompatibleDC32
(
hdc
);
SelectObject32
(
hdc
,
bm
);
BitBlt32
(
hdc
,
rect
.
right
-
(
sysMetrics
[
SM_CXSIZE
]
+
bmsz
.
cx
)
/
2
,
rect
.
top
+
(
sysMetrics
[
SM_CYCAPTION
]
-
1
-
bmsz
.
cy
)
/
2
,
bmsz
.
cx
,
bmsz
.
cy
,
hdcMem
,
0
,
0
,
SRCCOPY
);
BitBlt32
(
hdc
,
rect
.
right
-
(
sysMetrics
[
SM_CXSIZE
]
+
bmp
.
bmWidth
)
/
2
,
rect
.
top
+
(
sysMetrics
[
SM_CYCAPTION
]
-
1
-
bmp
.
bmHeight
)
/
2
,
bmp
.
bmWidth
,
bmp
.
bmHeight
,
hdcMem
,
0
,
0
,
SRCCOPY
);
SelectObject32
(
hdcMem
,
hOldBmp
);
DeleteDC32
(
hdcMem
);
}
return
;
}
/***********************************************************************
* NC_DrawFrame
*
...
...
@@ -1331,8 +1323,6 @@ static void NC_DrawFrame95(
InflateRect32
(
rect
,
-
width
,
-
height
);
}
/***********************************************************************
* NC_DrawMovingFrame
*
...
...
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