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
bee7d4b7
Commit
bee7d4b7
authored
Aug 20, 2010
by
David Hedberg
Committed by
Alexandre Julliard
Aug 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Implement IExplorerBrowser::SetRect.
parent
e4e62e70
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
2 deletions
+86
-2
ebrowser.c
dlls/shell32/ebrowser.c
+14
-2
ebrowser.c
dlls/shell32/tests/ebrowser.c
+72
-0
No files found.
dlls/shell32/ebrowser.c
View file @
bee7d4b7
...
...
@@ -191,9 +191,21 @@ static HRESULT WINAPI IExplorerBrowser_fnSetRect(IExplorerBrowser *iface,
HDWP
*
phdwp
,
RECT
rcBrowser
)
{
ExplorerBrowserImpl
*
This
=
(
ExplorerBrowserImpl
*
)
iface
;
FIXME
(
"stub,
%p (%p, %s)
\n
"
,
This
,
phdwp
,
wine_dbgstr_rect
(
&
rcBrowser
));
TRACE
(
"
%p (%p, %s)
\n
"
,
This
,
phdwp
,
wine_dbgstr_rect
(
&
rcBrowser
));
return
E_NOTIMPL
;
if
(
phdwp
)
{
*
phdwp
=
DeferWindowPos
(
*
phdwp
,
This
->
hwnd_main
,
NULL
,
rcBrowser
.
left
,
rcBrowser
.
top
,
rcBrowser
.
right
-
rcBrowser
.
left
,
rcBrowser
.
bottom
-
rcBrowser
.
top
,
SWP_NOZORDER
|
SWP_NOACTIVATE
);
}
else
{
MoveWindow
(
This
->
hwnd_main
,
rcBrowser
.
left
,
rcBrowser
.
top
,
rcBrowser
.
right
-
rcBrowser
.
left
,
rcBrowser
.
bottom
-
rcBrowser
.
top
,
TRUE
);
}
return
S_OK
;
}
static
HRESULT
WINAPI
IExplorerBrowser_fnSetPropertyBag
(
IExplorerBrowser
*
iface
,
...
...
dlls/shell32/tests/ebrowser.c
View file @
bee7d4b7
...
...
@@ -37,6 +37,13 @@ static HRESULT ebrowser_instantiate(IExplorerBrowser **peb)
&
IID_IExplorerBrowser
,
(
void
**
)
peb
);
}
static
HRESULT
ebrowser_initialize
(
IExplorerBrowser
*
peb
)
{
RECT
rc
;
rc
.
top
=
rc
.
left
=
0
;
rc
.
bottom
=
rc
.
right
=
500
;
return
IExplorerBrowser_Initialize
(
peb
,
hwnd
,
&
rc
,
NULL
);
}
static
void
test_QueryInterface
(
void
)
{
IExplorerBrowser
*
peb
;
...
...
@@ -265,6 +272,70 @@ static void test_initialization(void)
ok
(
lres
==
0
,
"Got refcount %d
\n
"
,
lres
);
}
static
void
test_basics
(
void
)
{
IExplorerBrowser
*
peb
;
IShellBrowser
*
psb
;
ULONG
lres
;
HDWP
hdwp
;
RECT
rc
;
HRESULT
hr
;
ebrowser_instantiate
(
&
peb
);
ebrowser_initialize
(
peb
);
/* SetRect */
rc
.
left
=
0
;
rc
.
top
=
0
;
rc
.
right
=
0
;
rc
.
bottom
=
0
;
hr
=
IExplorerBrowser_SetRect
(
peb
,
NULL
,
rc
);
ok
(
hr
==
S_OK
,
"got (0x%08x)
\n
"
,
hr
);
rc
.
left
=
100
;
rc
.
top
=
100
;
rc
.
right
=
10
;
rc
.
bottom
=
10
;
hr
=
IExplorerBrowser_SetRect
(
peb
,
NULL
,
rc
);
ok
(
hr
==
S_OK
,
"got (0x%08x)
\n
"
,
hr
);
/* SetRect with DeferWindowPos */
rc
.
left
=
rc
.
top
=
0
;
rc
.
right
=
rc
.
bottom
=
10
;
hdwp
=
BeginDeferWindowPos
(
1
);
hr
=
IExplorerBrowser_SetRect
(
peb
,
&
hdwp
,
rc
);
ok
(
hr
==
S_OK
,
"got (0x%08x)
\n
"
,
hr
);
lres
=
EndDeferWindowPos
(
hdwp
);
ok
(
lres
,
"EndDeferWindowPos failed.
\n
"
);
hdwp
=
NULL
;
hr
=
IExplorerBrowser_SetRect
(
peb
,
&
hdwp
,
rc
);
ok
(
hr
==
S_OK
,
"got (0x%08x)
\n
"
,
hr
);
ok
(
hdwp
==
NULL
,
"got %p
\n
"
,
hdwp
);
lres
=
EndDeferWindowPos
(
hdwp
);
ok
(
!
lres
,
"EndDeferWindowPos succeeded unexpectedly.
\n
"
);
/* Test positioning */
rc
.
left
=
10
;
rc
.
top
=
20
;
rc
.
right
=
50
;
rc
.
bottom
=
50
;
hr
=
IExplorerBrowser_SetRect
(
peb
,
NULL
,
rc
);
ok
(
hr
==
S_OK
,
"got (0x%08x)
\n
"
,
hr
);
hr
=
IExplorerBrowser_QueryInterface
(
peb
,
&
IID_IShellBrowser
,
(
void
**
)
&
psb
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
HWND
eb_hwnd
;
RECT
eb_rc
;
static
const
RECT
exp_rc
=
{
11
,
21
,
49
,
49
};
hr
=
IShellBrowser_GetWindow
(
psb
,
&
eb_hwnd
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
GetClientRect
(
eb_hwnd
,
&
eb_rc
);
MapWindowPoints
(
eb_hwnd
,
hwnd
,
(
POINT
*
)
&
eb_rc
,
2
);
ok
(
EqualRect
(
&
eb_rc
,
&
exp_rc
),
"Got rect (%d, %d) - (%d, %d)
\n
"
,
eb_rc
.
left
,
eb_rc
.
top
,
eb_rc
.
right
,
eb_rc
.
bottom
);
IShellBrowser_Release
(
psb
);
}
IExplorerBrowser_Destroy
(
peb
);
lres
=
IExplorerBrowser_Release
(
peb
);
ok
(
lres
==
0
,
"Got %d
\n
"
,
lres
);
}
static
BOOL
test_instantiate_control
(
void
)
{
IExplorerBrowser
*
peb
;
...
...
@@ -310,6 +381,7 @@ START_TEST(ebrowser)
test_QueryInterface
();
test_SB_misc
();
test_initialization
();
test_basics
();
DestroyWindow
(
hwnd
);
OleUninitialize
();
...
...
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