shdocvw: Add Open URL dialog to IE.

This commit is contained in:
Alexander Nicolaysen Sørnes 2010-07-21 16:38:45 +02:00 committed by Alexandre Julliard
parent 8e03cefbfa
commit 3feb26a2e1
3 changed files with 38 additions and 0 deletions

View File

@ -20,6 +20,18 @@
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
IDD_BROWSE_OPEN DIALOG 10, 10, 200, 70
STYLE DS_MODALFRAME | WS_CAPTION
CAPTION "Open URL"
FONT 8, "MS Shell Dlg"
{
LTEXT "Specify the URL you wish to open in Internet Explorer",-1,25, 5, 150,15
LTEXT "Open:", -1, 2, 32, 20, 15
EDITTEXT IDC_BROWSE_OPEN_URL, 25, 30, 160, 13
DEFPUSHBUTTON "&OK", IDOK, 25, 50, 50, 15
PUSHBUTTON "&Cancel", IDCANCEL, 85, 50, 50, 15
}
IDR_BROWSE_MAIN_MENU MENU
{
POPUP "&File"

View File

@ -47,6 +47,25 @@ 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};
static INT_PTR CALLBACK ie_dialog_open_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch(msg)
{
case WM_INITDIALOG:
return TRUE;
case WM_COMMAND:
switch(LOWORD(wparam))
{
case IDOK:
case IDCANCEL:
EndDialog(hwnd, wparam);
return TRUE;
}
}
return FALSE;
}
static void ie_dialog_about(HWND hwnd)
{
HICON icon = LoadImageW(GetModuleHandleW(0), MAKEINTRESOURCEW(IDI_APPICON), IMAGE_ICON, 48, 48, LR_SHARED);
@ -85,6 +104,10 @@ static LRESULT CALLBACK iewnd_OnCommand(InternetExplorer *This, HWND hwnd, UINT
{
switch(LOWORD(wparam))
{
case ID_BROWSE_OPEN:
DialogBoxW(shdocvw_hinstance, MAKEINTRESOURCEW(IDD_BROWSE_OPEN), hwnd, ie_dialog_open_proc);
break;
case ID_BROWSE_PRINT:
if(This->doc_host.document)
{

View File

@ -19,8 +19,11 @@
*/
#include <windef.h>
#include <winuser.h>
#define IDR_BROWSE_MAIN_MENU 1000
#define IDD_BROWSE_OPEN 1001
#define IDC_BROWSE_OPEN_URL 1002
#define ID_BROWSE_NEW_WINDOW 275
#define ID_BROWSE_OPEN 256