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
c5ac9829
Commit
c5ac9829
authored
Jul 27, 2010
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Jul 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Add an address bar to IE.
parent
07f169a9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
2 deletions
+54
-2
dochost.c
dlls/shdocvw/dochost.c
+2
-1
iexplore.c
dlls/shdocvw/iexplore.c
+49
-1
resource.h
dlls/shdocvw/resource.h
+2
-0
shdocvw.h
dlls/shdocvw/shdocvw.h
+1
-0
No files found.
dlls/shdocvw/dochost.c
View file @
c5ac9829
...
...
@@ -311,7 +311,8 @@ void create_doc_view_hwnd(DocHost *This)
doc_view_atom
=
RegisterClassExW
(
&
wndclass
);
}
GetClientRect
(
This
->
frame_hwnd
,
&
rect
);
/* FIXME */
GetClientRect
(
This
->
frame_hwnd
,
&
rect
);
adjust_ie_docobj_rect
(
This
->
frame_hwnd
,
&
rect
);
This
->
hwnd
=
CreateWindowExW
(
0
,
wszShell_DocObject_View
,
wszShell_DocObject_View
,
WS_CHILD
|
WS_VISIBLE
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
|
WS_TABSTOP
,
...
...
dlls/shdocvw/iexplore.c
View file @
c5ac9829
...
...
@@ -47,6 +47,15 @@ static const WCHAR szIEWinFrame[] = { 'I','E','F','r','a','m','e',0 };
static
const
WCHAR
wszWineInternetExplorer
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'I'
,
'n'
,
't'
,
'e'
,
'r'
,
'n'
,
'e'
,
't'
,
' '
,
'E'
,
'x'
,
'p'
,
'l'
,
'o'
,
'r'
,
'e'
,
'r'
,
0
};
void
adjust_ie_docobj_rect
(
HWND
frame
,
RECT
*
rc
)
{
HWND
hwndRebar
=
GetDlgItem
(
frame
,
IDC_BROWSE_REBAR
);
INT
barHeight
=
SendMessageW
(
hwndRebar
,
RB_GETBARHEIGHT
,
0
,
0
);
rc
->
top
+=
barHeight
;
rc
->
bottom
-=
barHeight
;
}
static
INT_PTR
CALLBACK
ie_dialog_open_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
static
InternetExplorer
*
This
;
...
...
@@ -105,18 +114,57 @@ static void ie_dialog_about(HWND hwnd)
DestroyIcon
(
icon
);
}
static
void
create_rebar
(
HWND
hwnd
)
{
HWND
hwndRebar
;
HWND
hwndAddress
;
REBARINFO
rebarinf
;
REBARBANDINFOW
bandinf
;
WCHAR
addr
[]
=
{
'A'
,
'd'
,
'd'
,
'r'
,
'e'
,
's'
,
's'
,
0
};
hwndRebar
=
CreateWindowExW
(
WS_EX_TOOLWINDOW
,
REBARCLASSNAMEW
,
NULL
,
WS_CHILD
|
WS_VISIBLE
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
|
RBS_VARHEIGHT
|
CCS_TOP
|
CCS_NODIVIDER
,
0
,
0
,
0
,
0
,
hwnd
,
(
HMENU
)
IDC_BROWSE_REBAR
,
shdocvw_hinstance
,
NULL
);
rebarinf
.
cbSize
=
sizeof
(
rebarinf
);
rebarinf
.
fMask
=
0
;
rebarinf
.
himl
=
NULL
;
rebarinf
.
cbSize
=
sizeof
(
rebarinf
);
SendMessageW
(
hwndRebar
,
RB_SETBARINFO
,
0
,
(
LPARAM
)
&
rebarinf
);
hwndAddress
=
CreateWindowExW
(
0
,
WC_COMBOBOXEXW
,
NULL
,
WS_BORDER
|
WS_CHILD
|
WS_VISIBLE
|
CBS_DROPDOWN
,
0
,
0
,
100
,
20
,
hwndRebar
,
(
HMENU
)
IDC_BROWSE_ADDRESSBAR
,
shdocvw_hinstance
,
NULL
);
bandinf
.
fMask
=
RBBIM_STYLE
|
RBBIM_CHILD
|
RBBIM_CHILDSIZE
|
RBBIM_SIZE
|
RBBIM_TEXT
;
bandinf
.
fStyle
=
RBBS_CHILDEDGE
|
RBBS_GRIPPERALWAYS
;
bandinf
.
lpText
=
addr
;
bandinf
.
cx
=
100
;
bandinf
.
cyMinChild
=
20
;
bandinf
.
hwndChild
=
hwndAddress
;
SendMessageW
(
hwndRebar
,
RB_INSERTBANDW
,
0
,
(
LPARAM
)
&
bandinf
);
}
static
LRESULT
iewnd_OnCreate
(
HWND
hwnd
,
LPCREATESTRUCTW
lpcs
)
{
SetWindowLongPtrW
(
hwnd
,
0
,
(
LONG_PTR
)
lpcs
->
lpCreateParams
);
create_rebar
(
hwnd
);
return
0
;
}
static
LRESULT
iewnd_OnSize
(
InternetExplorer
*
This
,
INT
width
,
INT
height
)
{
HWND
hwndRebar
=
GetDlgItem
(
This
->
frame_hwnd
,
IDC_BROWSE_REBAR
);
INT
barHeight
=
SendMessageW
(
hwndRebar
,
RB_GETBARHEIGHT
,
0
,
0
);
RECT
docarea
=
{
0
,
0
,
width
,
height
};
adjust_ie_docobj_rect
(
This
->
frame_hwnd
,
&
docarea
);
if
(
This
->
doc_host
.
hwnd
)
SetWindowPos
(
This
->
doc_host
.
hwnd
,
NULL
,
0
,
0
,
width
,
height
,
SetWindowPos
(
This
->
doc_host
.
hwnd
,
NULL
,
docarea
.
left
,
docarea
.
top
,
docarea
.
right
,
docarea
.
bottom
,
SWP_NOZORDER
|
SWP_NOACTIVATE
);
SetWindowPos
(
hwndRebar
,
NULL
,
0
,
0
,
width
,
barHeight
,
SWP_NOZORDER
|
SWP_NOACTIVATE
);
return
0
;
}
...
...
dlls/shdocvw/resource.h
View file @
c5ac9829
...
...
@@ -24,6 +24,8 @@
#define IDR_BROWSE_MAIN_MENU 1000
#define IDD_BROWSE_OPEN 1001
#define IDC_BROWSE_OPEN_URL 1002
#define IDC_BROWSE_REBAR 1003
#define IDC_BROWSE_ADDRESSBAR 1004
#define ID_BROWSE_NEW_WINDOW 275
#define ID_BROWSE_OPEN 256
...
...
dlls/shdocvw/shdocvw.h
View file @
c5ac9829
...
...
@@ -270,6 +270,7 @@ static inline void SHDOCVW_UnlockModule(void) { InterlockedDecrement( &SHDOCVW_r
extern
HINSTANCE
shdocvw_hinstance
;
extern
void
register_iewindow_class
(
void
);
extern
void
unregister_iewindow_class
(
void
);
extern
void
adjust_ie_docobj_rect
(
HWND
,
RECT
*
);
HRESULT
register_class_object
(
BOOL
);
HRESULT
get_typeinfo
(
ITypeInfo
**
);
...
...
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