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
5d7c4609
Commit
5d7c4609
authored
Aug 03, 2010
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Aug 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Add a toolbar to IE.
parent
abc1e565
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
4 deletions
+72
-4
En.rc
dlls/shdocvw/En.rc
+10
-0
iexplore.c
dlls/shdocvw/iexplore.c
+54
-4
resource.h
dlls/shdocvw/resource.h
+8
-0
No files found.
dlls/shdocvw/En.rc
View file @
5d7c4609
...
@@ -60,3 +60,13 @@ IDR_BROWSE_MAIN_MENU MENU
...
@@ -60,3 +60,13 @@ IDR_BROWSE_MAIN_MENU MENU
MENUITEM "&About Internet Explorer...", ID_BROWSE_ABOUT
MENUITEM "&About Internet Explorer...", ID_BROWSE_ABOUT
}
}
}
}
STRINGTABLE
{
IDS_TB_BACK "Back"
IDS_TB_FORWARD "Forward"
IDS_TB_STOP "Stop"
IDS_TB_REFRESH "Refresh"
IDS_TB_HOME "Home"
IDS_TB_PRINT "Print"
}
dlls/shdocvw/iexplore.c
View file @
5d7c4609
...
@@ -319,10 +319,39 @@ static void ie_dialog_about(HWND hwnd)
...
@@ -319,10 +319,39 @@ static void ie_dialog_about(HWND hwnd)
DestroyIcon
(
icon
);
DestroyIcon
(
icon
);
}
}
static
void
add_tb_separator
(
HWND
hwnd
)
{
TBBUTTON
btn
;
ZeroMemory
(
&
btn
,
sizeof
(
btn
));
btn
.
iBitmap
=
3
;
btn
.
fsStyle
=
BTNS_SEP
;
SendMessageW
(
hwnd
,
TB_ADDBUTTONSW
,
1
,
(
LPARAM
)
&
btn
);
}
static
void
add_tb_button
(
HWND
hwnd
,
int
bmp
,
int
cmd
,
int
strId
)
{
TBBUTTON
btn
;
WCHAR
buf
[
30
];
LoadStringW
(
shdocvw_hinstance
,
strId
,
buf
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]));
btn
.
iBitmap
=
bmp
;
btn
.
idCommand
=
cmd
;
btn
.
fsState
=
TBSTATE_ENABLED
;
btn
.
fsStyle
=
BTNS_SHOWTEXT
;
btn
.
dwData
=
0
;
btn
.
iString
=
(
INT_PTR
)
buf
;
SendMessageW
(
hwnd
,
TB_ADDBUTTONSW
,
1
,
(
LPARAM
)
&
btn
);
}
static
void
create_rebar
(
HWND
hwnd
)
static
void
create_rebar
(
HWND
hwnd
)
{
{
HWND
hwndRebar
;
HWND
hwndRebar
;
HWND
hwndAddress
;
HWND
hwndAddress
;
HWND
hwndToolbar
;
REBARINFO
rebarinf
;
REBARINFO
rebarinf
;
REBARBANDINFOW
bandinf
;
REBARBANDINFOW
bandinf
;
WCHAR
addr
[]
=
{
'A'
,
'd'
,
'd'
,
'r'
,
'e'
,
's'
,
's'
,
0
};
WCHAR
addr
[]
=
{
'A'
,
'd'
,
'd'
,
'r'
,
'e'
,
's'
,
's'
,
0
};
...
@@ -336,16 +365,37 @@ static void create_rebar(HWND hwnd)
...
@@ -336,16 +365,37 @@ static void create_rebar(HWND hwnd)
SendMessageW
(
hwndRebar
,
RB_SETBARINFO
,
0
,
(
LPARAM
)
&
rebarinf
);
SendMessageW
(
hwndRebar
,
RB_SETBARINFO
,
0
,
(
LPARAM
)
&
rebarinf
);
hwndToolbar
=
CreateWindowExW
(
TBSTYLE_EX_MIXEDBUTTONS
,
TOOLBARCLASSNAMEW
,
NULL
,
TBSTYLE_FLAT
|
WS_CHILD
|
WS_VISIBLE
,
0
,
0
,
0
,
0
,
hwndRebar
,
(
HMENU
)
IDC_BROWSE_TOOLBAR
,
shdocvw_hinstance
,
NULL
);
SendMessageW
(
hwndToolbar
,
TB_BUTTONSTRUCTSIZE
,
sizeof
(
TBBUTTON
),
0
);
add_tb_button
(
hwndToolbar
,
I_IMAGENONE
,
0
,
IDS_TB_BACK
);
add_tb_button
(
hwndToolbar
,
I_IMAGENONE
,
0
,
IDS_TB_FORWARD
);
add_tb_button
(
hwndToolbar
,
I_IMAGENONE
,
0
,
IDS_TB_STOP
);
add_tb_button
(
hwndToolbar
,
I_IMAGENONE
,
0
,
IDS_TB_REFRESH
);
add_tb_button
(
hwndToolbar
,
I_IMAGENONE
,
0
,
IDS_TB_HOME
);
add_tb_separator
(
hwndToolbar
);
add_tb_button
(
hwndToolbar
,
I_IMAGENONE
,
ID_BROWSE_PRINT
,
IDS_TB_PRINT
);
SendMessageW
(
hwndToolbar
,
TB_SETBUTTONSIZE
,
0
,
MAKELPARAM
(
50
,
40
));
SendMessageW
(
hwndToolbar
,
TB_AUTOSIZE
,
0
,
0
);
bandinf
.
cbSize
=
sizeof
(
bandinf
);
bandinf
.
fMask
=
RBBIM_STYLE
|
RBBIM_CHILD
|
RBBIM_CHILDSIZE
|
RBBIM_SIZE
;
bandinf
.
fStyle
=
RBBS_CHILDEDGE
;
bandinf
.
cx
=
100
;
bandinf
.
cyMinChild
=
42
;
bandinf
.
hwndChild
=
hwndToolbar
;
SendMessageW
(
hwndRebar
,
RB_INSERTBANDW
,
-
1
,
(
LPARAM
)
&
bandinf
);
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
);
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
.
fMask
|=
RBBIM_TEXT
;
bandinf
.
fStyle
=
RBBS_CHILDEDGE
|
RBBS_
GRIPPERALWAYS
;
bandinf
.
fStyle
=
RBBS_CHILDEDGE
|
RBBS_
BREAK
;
bandinf
.
lpText
=
addr
;
bandinf
.
lpText
=
addr
;
bandinf
.
cx
=
100
;
bandinf
.
cyMinChild
=
20
;
bandinf
.
cyMinChild
=
20
;
bandinf
.
hwndChild
=
hwndAddress
;
bandinf
.
hwndChild
=
hwndAddress
;
SendMessageW
(
hwndRebar
,
RB_INSERTBANDW
,
0
,
(
LPARAM
)
&
bandinf
);
SendMessageW
(
hwndRebar
,
RB_INSERTBANDW
,
-
1
,
(
LPARAM
)
&
bandinf
);
}
}
static
LRESULT
iewnd_OnCreate
(
HWND
hwnd
,
LPCREATESTRUCTW
lpcs
)
static
LRESULT
iewnd_OnCreate
(
HWND
hwnd
,
LPCREATESTRUCTW
lpcs
)
...
...
dlls/shdocvw/resource.h
View file @
5d7c4609
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#define IDC_BROWSE_REBAR 1003
#define IDC_BROWSE_REBAR 1003
#define IDC_BROWSE_ADDRESSBAR 1004
#define IDC_BROWSE_ADDRESSBAR 1004
#define IDC_BROWSE_STATUSBAR 1005
#define IDC_BROWSE_STATUSBAR 1005
#define IDC_BROWSE_TOOLBAR 1006
#define ID_BROWSE_NEW_WINDOW 275
#define ID_BROWSE_NEW_WINDOW 275
#define ID_BROWSE_OPEN 256
#define ID_BROWSE_OPEN 256
...
@@ -42,3 +43,10 @@
...
@@ -42,3 +43,10 @@
#define ID_BROWSE_GOTOFAV_FIRST 2000
#define ID_BROWSE_GOTOFAV_FIRST 2000
#define ID_BROWSE_GOTOFAV_MAX 65000
#define ID_BROWSE_GOTOFAV_MAX 65000
#define IDS_TB_BACK 1100
#define IDS_TB_FORWARD 1101
#define IDS_TB_STOP 1102
#define IDS_TB_REFRESH 1103
#define IDS_TB_HOME 1104
#define IDS_TB_PRINT 1105
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