Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
cb84de98
Commit
cb84de98
authored
Aug 05, 2003
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 05, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make GetWindowInfo() work for all windows and return correct values.
parent
511577da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
29 deletions
+15
-29
win.c
windows/win.c
+15
-29
No files found.
windows/win.c
View file @
cb84de98
...
...
@@ -3238,42 +3238,28 @@ UINT WINAPI GetWindowModuleFileNameW( HWND hwnd, LPSTR lpszFileName, UINT cchFil
*/
BOOL
WINAPI
GetWindowInfo
(
HWND
hwnd
,
PWINDOWINFO
pwi
)
{
WND
*
wndInfo
=
NULL
;
if
(
!
pwi
)
return
FALSE
;
if
(
pwi
->
cbSize
!=
sizeof
(
WINDOWINFO
))
{
FIXME
(
"windowinfo->cbSize != sizeof(WINDOWINFO). Please report
\n
"
);
return
FALSE
;
}
wndInfo
=
WIN_GetPtr
(
hwnd
);
if
(
!
wndInfo
)
return
FALSE
;
if
(
wndInfo
==
WND_OTHER_PROCESS
)
{
FIXME
(
"window belong to other process
\n
"
);
return
FALSE
;
}
if
(
!
IsWindow
(
hwnd
))
return
FALSE
;
GetWindowRect
(
hwnd
,
&
pwi
->
rcWindow
);
GetClientRect
(
hwnd
,
&
pwi
->
rcClient
);
/* translate to screen coordinates */
MapWindowPoints
(
hwnd
,
0
,
(
LPPOINT
)
&
pwi
->
rcClient
,
2
);
pwi
->
rcWindow
=
wndInfo
->
rectWindow
;
pwi
->
rcClient
=
wndInfo
->
rectClient
;
pwi
->
dwStyle
=
wndInfo
->
dwStyle
;
pwi
->
dwExStyle
=
wndInfo
->
dwExStyle
;
pwi
->
dwStyle
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
pwi
->
dwExStyle
=
GetWindowLongW
(
hwnd
,
GWL_EXSTYLE
);
pwi
->
dwWindowStatus
=
((
GetActiveWindow
()
==
hwnd
)
?
WS_ACTIVECAPTION
:
0
);
/* if active WS_ACTIVECAPTION, else 0 */
pwi
->
cxWindowBorders
=
((
wndInfo
->
dwStyle
&
WS_BORDER
)
?
GetSystemMetrics
(
SM_CXBORDER
)
:
0
);
pwi
->
cyWindowBorders
=
((
wndInfo
->
dwStyle
&
WS_BORDER
)
?
GetSystemMetrics
(
SM_CYBORDER
)
:
0
);
/* above two: I'm presuming that borders widths are the same
* for each window - so long as its actually using a border.. */
pwi
->
atomWindowType
=
GetClassLongA
(
hwnd
,
GCW_ATOM
);
pwi
->
wCreatorVersion
=
GetVersion
();
/* Docs say this should be the version that
* CREATED the window. But eh?.. Isn't that just the
* version we are running.. Unless ofcourse its some wacky
* RPC stuff or something */
WIN_ReleasePtr
(
wndInfo
);
pwi
->
cxWindowBorders
=
pwi
->
rcClient
.
left
-
pwi
->
rcWindow
.
left
;
pwi
->
cyWindowBorders
=
pwi
->
rcWindow
.
bottom
-
pwi
->
rcClient
.
bottom
;
pwi
->
atomWindowType
=
GetClassLongW
(
hwnd
,
GCW_ATOM
);
pwi
->
wCreatorVersion
=
0x0400
;
return
TRUE
;
}
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