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
5773dade
Commit
5773dade
authored
Jun 12, 1999
by
Gerard Patel
Committed by
Alexandre Julliard
Jun 12, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Draws a border around windows with old win31 style (only ws_border) in
win95 look.
parent
6a3ad422
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
32 deletions
+33
-32
nonclient.c
windows/nonclient.c
+33
-32
No files found.
windows/nonclient.c
View file @
5773dade
...
@@ -56,6 +56,12 @@ static HBITMAP16 hbitmapRestoreD = 0;
...
@@ -56,6 +56,12 @@ static HBITMAP16 hbitmapRestoreD = 0;
((style) & WS_DLGFRAME)) && ((style) & WS_BORDER)) && \
((style) & WS_DLGFRAME)) && ((style) & WS_BORDER)) && \
!((style) & WS_THICKFRAME))
!((style) & WS_THICKFRAME))
/* win31 style (simple border) in win95 look */
#define HAS_CLASSICBORDER(style,exStyle) \
(!((exStyle) & WS_EX_STATICEDGE) && !((exStyle) & WS_EX_CLIENTEDGE) && \
!((style) & WS_THICKFRAME) && !((style) & WS_DLGFRAME) && \
((style) & WS_BORDER))
#define HAS_SIZEFRAME(style) \
#define HAS_SIZEFRAME(style) \
(((style) & WS_THICKFRAME) && \
(((style) & WS_THICKFRAME) && \
!(((style) & (WS_DLGFRAME|WS_BORDER)) == WS_DLGFRAME))
!(((style) & (WS_DLGFRAME|WS_BORDER)) == WS_DLGFRAME))
...
@@ -218,6 +224,9 @@ NC_AdjustRectInner95 (LPRECT16 rect, DWORD style, DWORD exStyle)
...
@@ -218,6 +224,9 @@ NC_AdjustRectInner95 (LPRECT16 rect, DWORD style, DWORD exStyle)
if
(
exStyle
&
WS_EX_STATICEDGE
)
if
(
exStyle
&
WS_EX_STATICEDGE
)
InflateRect16
(
rect
,
GetSystemMetrics
(
SM_CXBORDER
),
GetSystemMetrics
(
SM_CYBORDER
));
InflateRect16
(
rect
,
GetSystemMetrics
(
SM_CXBORDER
),
GetSystemMetrics
(
SM_CYBORDER
));
if
(
HAS_CLASSICBORDER
(
style
,
exStyle
))
InflateRect16
(
rect
,
GetSystemMetrics
(
SM_CXBORDER
),
GetSystemMetrics
(
SM_CYBORDER
));
if
(
style
&
WS_VSCROLL
)
rect
->
right
+=
GetSystemMetrics
(
SM_CXVSCROLL
);
if
(
style
&
WS_VSCROLL
)
rect
->
right
+=
GetSystemMetrics
(
SM_CXVSCROLL
);
if
(
style
&
WS_HSCROLL
)
rect
->
bottom
+=
GetSystemMetrics
(
SM_CYHSCROLL
);
if
(
style
&
WS_HSCROLL
)
rect
->
bottom
+=
GetSystemMetrics
(
SM_CYHSCROLL
);
}
}
...
@@ -343,17 +352,11 @@ DrawCaptionTempA (HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont,
...
@@ -343,17 +352,11 @@ DrawCaptionTempA (HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont,
GetSystemMetrics
(
SM_CYSMICON
),
0
,
0
,
DI_NORMAL
);
GetSystemMetrics
(
SM_CYSMICON
),
0
,
0
,
DI_NORMAL
);
}
}
else
{
else
{
WND
*
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
HICON
hAppIcon
=
(
HICON
)
GetClassLongA
(
hwnd
,
GCL_HICONSM
);
HICON
hAppIcon
=
0
;
if
(
!
hAppIcon
)
hAppIcon
=
(
HICON
)
GetClassLongA
(
hwnd
,
GCL_HICON
);
if
(
wndPtr
->
class
->
hIconSm
)
hAppIcon
=
wndPtr
->
class
->
hIconSm
;
else
if
(
wndPtr
->
class
->
hIcon
)
hAppIcon
=
wndPtr
->
class
->
hIcon
;
DrawIconEx
(
hdc
,
pt
.
x
,
pt
.
y
,
hAppIcon
,
GetSystemMetrics
(
SM_CXSMICON
),
DrawIconEx
(
hdc
,
pt
.
x
,
pt
.
y
,
hAppIcon
,
GetSystemMetrics
(
SM_CXSMICON
),
GetSystemMetrics
(
SM_CYSMICON
),
0
,
0
,
DI_NORMAL
);
GetSystemMetrics
(
SM_CYSMICON
),
0
,
0
,
DI_NORMAL
);
WIN_ReleaseWndPtr
(
wndPtr
);
}
}
rc
.
left
+=
(
rc
.
bottom
-
rc
.
top
);
rc
.
left
+=
(
rc
.
bottom
-
rc
.
top
);
...
@@ -503,9 +506,10 @@ LONG NC_HandleNCCalcSize( WND *pWnd, RECT *winRect )
...
@@ -503,9 +506,10 @@ LONG NC_HandleNCCalcSize( WND *pWnd, RECT *winRect )
{
{
RECT16
tmpRect
=
{
0
,
0
,
0
,
0
};
RECT16
tmpRect
=
{
0
,
0
,
0
,
0
};
LONG
result
=
0
;
LONG
result
=
0
;
UINT
style
=
(
UINT
)
GetClassLongA
(
pWnd
->
hwndSelf
,
GCL_STYLE
);
if
(
pWnd
->
class
->
style
&
CS_VREDRAW
)
result
|=
WVR_VREDRAW
;
if
(
style
&
CS_VREDRAW
)
result
|=
WVR_VREDRAW
;
if
(
pWnd
->
class
->
style
&
CS_HREDRAW
)
result
|=
WVR_HREDRAW
;
if
(
style
&
CS_HREDRAW
)
result
|=
WVR_HREDRAW
;
if
(
!
(
pWnd
->
dwStyle
&
WS_MINIMIZE
)
)
{
if
(
!
(
pWnd
->
dwStyle
&
WS_MINIMIZE
)
)
{
if
(
TWEAK_WineLook
==
WIN31_LOOK
)
if
(
TWEAK_WineLook
==
WIN31_LOOK
)
...
@@ -841,7 +845,8 @@ NC_DoNCHitTest95 (WND *wndPtr, POINT16 pt )
...
@@ -841,7 +845,8 @@ NC_DoNCHitTest95 (WND *wndPtr, POINT16 pt )
{
{
/* Check system menu */
/* Check system menu */
if
((
wndPtr
->
dwStyle
&
WS_SYSMENU
)
&&
if
((
wndPtr
->
dwStyle
&
WS_SYSMENU
)
&&
((
wndPtr
->
class
->
hIconSm
)
||
(
wndPtr
->
class
->
hIcon
)))
(((
HICON
)
GetClassLongA
(
wndPtr
->
hwndSelf
,
GCL_HICONSM
))
||
((
HICON
)
GetClassLongA
(
wndPtr
->
hwndSelf
,
GCL_HICON
))))
rect
.
left
+=
GetSystemMetrics
(
SM_CYCAPTION
)
-
1
;
rect
.
left
+=
GetSystemMetrics
(
SM_CYCAPTION
)
-
1
;
if
(
pt
.
x
<
rect
.
left
)
return
HTSYSMENU
;
if
(
pt
.
x
<
rect
.
left
)
return
HTSYSMENU
;
...
@@ -1028,15 +1033,13 @@ NC_DrawSysButton95 (HWND hwnd, HDC hdc, BOOL down)
...
@@ -1028,15 +1033,13 @@ NC_DrawSysButton95 (HWND hwnd, HDC hdc, BOOL down)
if
(
!
(
wndPtr
->
flags
&
WIN_MANAGED
)
)
if
(
!
(
wndPtr
->
flags
&
WIN_MANAGED
)
)
{
{
HICON
hIcon
=
0
;
HICON
hIcon
;
RECT
rect
;
RECT
rect
;
NC_GetInsideRect95
(
hwnd
,
&
rect
);
NC_GetInsideRect95
(
hwnd
,
&
rect
);
if
(
wndPtr
->
class
->
hIconSm
)
hIcon
=
(
HICON
)
GetClassLongA
(
wndPtr
->
hwndSelf
,
GCL_HICONSM
);
hIcon
=
wndPtr
->
class
->
hIconSm
;
if
(
!
hIcon
)
hIcon
=
(
HICON
)
GetClassLongA
(
wndPtr
->
hwndSelf
,
GCL_HICON
);
else
if
(
wndPtr
->
class
->
hIcon
)
hIcon
=
wndPtr
->
class
->
hIcon
;
if
(
hIcon
)
if
(
hIcon
)
DrawIconEx
(
hdc
,
rect
.
left
+
2
,
rect
.
top
+
2
,
hIcon
,
DrawIconEx
(
hdc
,
rect
.
left
+
2
,
rect
.
top
+
2
,
hIcon
,
...
@@ -1720,7 +1723,11 @@ void NC_DoNCPaint95(
...
@@ -1720,7 +1723,11 @@ void NC_DoNCPaint95(
(
wndPtr
->
dwExStyle
&
WS_EX_DLGMODALFRAME
)
||
(
wndPtr
->
dwStyle
&
WS_THICKFRAME
)))
{
(
wndPtr
->
dwExStyle
&
WS_EX_DLGMODALFRAME
)
||
(
wndPtr
->
dwStyle
&
WS_THICKFRAME
)))
{
DrawEdge
(
hdc
,
&
rect
,
EDGE_RAISED
,
BF_RECT
|
BF_ADJUST
);
DrawEdge
(
hdc
,
&
rect
,
EDGE_RAISED
,
BF_RECT
|
BF_ADJUST
);
}
}
else
if
(
HAS_CLASSICBORDER
(
wndPtr
->
dwStyle
,
wndPtr
->
dwExStyle
))
{
SelectObject
(
hdc
,
GetStockObject
(
NULL_BRUSH
)
);
Rectangle
(
hdc
,
0
,
0
,
rect
.
right
,
rect
.
bottom
);
}
if
(
HAS_FIXEDFRAME
(
wndPtr
->
dwStyle
,
wndPtr
->
dwExStyle
))
if
(
HAS_FIXEDFRAME
(
wndPtr
->
dwStyle
,
wndPtr
->
dwExStyle
))
NC_DrawFrame95
(
hdc
,
&
rect
,
TRUE
,
active
);
NC_DrawFrame95
(
hdc
,
&
rect
,
TRUE
,
active
);
else
if
(
wndPtr
->
dwStyle
&
WS_THICKFRAME
)
else
if
(
wndPtr
->
dwStyle
&
WS_THICKFRAME
)
...
@@ -1859,18 +1866,12 @@ LONG NC_HandleSetCursor( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
...
@@ -1859,18 +1866,12 @@ LONG NC_HandleSetCursor( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
case
HTCLIENT
:
case
HTCLIENT
:
{
{
WND
*
wndPtr
;
HICON16
hCursor
=
(
HICON16
)
GetClassWord
(
hwnd
,
GCW_HCURSOR
);
BOOL
retvalue
;
if
(
hCursor
)
{
SetCursor16
(
hCursor
);
if
(
!
(
wndPtr
=
WIN_FindWndPtr
(
hwnd
)))
break
;
return
TRUE
;
if
(
wndPtr
->
class
->
hCursor
)
{
SetCursor16
(
wndPtr
->
class
->
hCursor
);
retvalue
=
TRUE
;
}
}
else
retvalue
=
FALSE
;
return
FALSE
;
WIN_ReleaseWndPtr
(
wndPtr
);
return
retvalue
;
}
}
case
HTLEFT
:
case
HTLEFT
:
...
@@ -2111,8 +2112,8 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam )
...
@@ -2111,8 +2112,8 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam )
if
(
iconic
)
/* create a cursor for dragging */
if
(
iconic
)
/* create a cursor for dragging */
{
{
HICON16
hIcon
=
(
wndPtr
->
class
->
hIcon
)
?
wndPtr
->
class
->
hIcon
HICON16
hIcon
=
GetClassWord
(
wndPtr
->
hwndSelf
,
GCW_HICON
);
:
(
HICON16
)
SendMessage16
(
hwnd
,
WM_QUERYDRAGICON
,
0
,
0L
);
if
(
!
hIcon
)
hIcon
=
(
HICON16
)
SendMessage16
(
hwnd
,
WM_QUERYDRAGICON
,
0
,
0L
);
if
(
hIcon
)
hDragCursor
=
CURSORICON_IconToCursor
(
hIcon
,
TRUE
);
if
(
hIcon
)
hDragCursor
=
CURSORICON_IconToCursor
(
hIcon
,
TRUE
);
if
(
!
hDragCursor
)
iconic
=
FALSE
;
if
(
!
hDragCursor
)
iconic
=
FALSE
;
}
}
...
@@ -2500,7 +2501,7 @@ LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM16 wParam, LPARAM lParam )
...
@@ -2500,7 +2501,7 @@ LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM16 wParam, LPARAM lParam )
break
;
break
;
case
HTSYSMENU
:
case
HTSYSMENU
:
if
(
!
(
pWnd
->
class
->
style
&
CS_NOCLOSE
))
if
(
!
(
GetClassWord
(
pWnd
->
hwndSelf
,
GCW_STYLE
)
&
CS_NOCLOSE
))
SendMessage16
(
pWnd
->
hwndSelf
,
WM_SYSCOMMAND
,
SC_CLOSE
,
lParam
);
SendMessage16
(
pWnd
->
hwndSelf
,
WM_SYSCOMMAND
,
SC_CLOSE
,
lParam
);
break
;
break
;
...
...
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