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
9ab8fc6f
Commit
9ab8fc6f
authored
Oct 19, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Oct 19, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Windows with WS_EX_TOOLWINDOW style should not have min/max buttons.
parent
1023fe30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
nonclient.c
windows/nonclient.c
+15
-3
No files found.
windows/nonclient.c
View file @
9ab8fc6f
...
...
@@ -549,6 +549,8 @@ static LONG NC_DoNCHitTest (WND *wndPtr, POINT pt )
rect
.
top
+=
GetSystemMetrics
(
SM_CYCAPTION
)
-
1
;
if
(
!
PtInRect
(
&
rect
,
pt
))
{
BOOL
min_or_max_box
=
(
wndPtr
->
dwStyle
&
WS_MAXIMIZEBOX
)
||
(
wndPtr
->
dwStyle
&
WS_MINIMIZEBOX
);
/* Check system menu */
if
((
wndPtr
->
dwStyle
&
WS_SYSMENU
)
&&
!
(
wndPtr
->
dwExStyle
&
WS_EX_TOOLWINDOW
))
{
...
...
@@ -564,13 +566,13 @@ static LONG NC_DoNCHitTest (WND *wndPtr, POINT pt )
/* Check maximize box */
/* In win95 there is automatically a Maximize button when there is a minimize one*/
if
(
(
wndPtr
->
dwStyle
&
WS_MAXIMIZEBOX
)
||
(
wndPtr
->
dwStyle
&
WS_MINIMIZEBOX
))
if
(
min_or_max_box
&&
!
(
wndPtr
->
dwExStyle
&
WS_EX_TOOLWINDOW
))
rect
.
right
-=
GetSystemMetrics
(
SM_CXSIZE
)
+
1
;
if
(
pt
.
x
>
rect
.
right
)
return
HTMAXBUTTON
;
/* Check minimize box */
/* In win95 there is automatically a Maximize button when there is a Maximize one*/
if
(
(
wndPtr
->
dwStyle
&
WS_MINIMIZEBOX
)
||
(
wndPtr
->
dwStyle
&
WS_MAXIMIZEBOX
))
if
(
min_or_max_box
&&
!
(
wndPtr
->
dwExStyle
&
WS_EX_TOOLWINDOW
))
rect
.
right
-=
GetSystemMetrics
(
SM_CXSIZE
)
+
1
;
if
(
pt
.
x
>
rect
.
right
)
return
HTMINBUTTON
;
...
...
@@ -711,7 +713,13 @@ static void NC_DrawCloseButton (HWND hwnd, HDC hdc, BOOL down, BOOL bGrayed)
static
void
NC_DrawMaxButton
(
HWND
hwnd
,
HDC
hdc
,
BOOL
down
,
BOOL
bGrayed
)
{
RECT
rect
;
UINT
flags
=
IsZoomed
(
hwnd
)
?
DFCS_CAPTIONRESTORE
:
DFCS_CAPTIONMAX
;
UINT
flags
;
/* never draw maximize box when window has WS_EX_TOOLWINDOW style */
if
(
GetWindowLongW
(
hwnd
,
GWL_EXSTYLE
)
&
WS_EX_TOOLWINDOW
)
return
;
flags
=
IsZoomed
(
hwnd
)
?
DFCS_CAPTIONRESTORE
:
DFCS_CAPTIONMAX
;
NC_GetInsideRect
(
hwnd
,
&
rect
);
if
(
GetWindowLongA
(
hwnd
,
GWL_STYLE
)
&
WS_SYSMENU
)
...
...
@@ -737,6 +745,10 @@ static void NC_DrawMinButton(HWND hwnd,HDC hdc,BOOL down, BOOL bGrayed)
UINT
flags
=
DFCS_CAPTIONMIN
;
DWORD
style
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
/* never draw minimize box when window has WS_EX_TOOLWINDOW style */
if
(
GetWindowLongW
(
hwnd
,
GWL_EXSTYLE
)
&
WS_EX_TOOLWINDOW
)
return
;
NC_GetInsideRect
(
hwnd
,
&
rect
);
if
(
style
&
WS_SYSMENU
)
rect
.
right
-=
GetSystemMetrics
(
SM_CXSIZE
)
+
1
;
...
...
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