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
147cf1da
Commit
147cf1da
authored
Mar 12, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added HTMLWindow2_prompt implementation.
parent
3a54e89f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
98 additions
and
2 deletions
+98
-2
En.rc
dlls/mshtml/En.rc
+11
-0
htmlwindow.c
dlls/mshtml/htmlwindow.c
+83
-2
resource.h
dlls/mshtml/resource.h
+4
-0
No files found.
dlls/mshtml/En.rc
View file @
147cf1da
...
...
@@ -53,3 +53,14 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON "OK", IDOK, 200, 10, 45, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Cancel", IDCANCEL, 200, 28, 45, 14, WS_GROUP | WS_TABSTOP
}
ID_PROMPT_DIALOG DIALOG 0, 0, 200, 90
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION ""
FONT 8, "MS Shell Dlg"
{
LTEXT "", ID_PROMPT_PROMPT, 10, 10, 180, 30
EDITTEXT ID_PROMPT_EDIT, 10, 45, 180, 14, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 40, 65, 45, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Cancel", IDCANCEL, 115, 65, 45, 15, WS_GROUP | WS_TABSTOP
}
dlls/mshtml/htmlwindow.c
View file @
147cf1da
...
...
@@ -230,12 +230,93 @@ static HRESULT WINAPI HTMLWindow2_confirm(IHTMLWindow2 *iface, BSTR message,
return
E_NOTIMPL
;
}
typedef
struct
{
BSTR
message
;
BSTR
dststr
;
VARIANT
*
textdata
;
}
prompt_arg
;
static
INT_PTR
CALLBACK
prompt_dlgproc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
switch
(
msg
)
{
case
WM_INITDIALOG
:
{
prompt_arg
*
arg
=
(
prompt_arg
*
)
lparam
;
WCHAR
wszTitle
[
100
];
if
(
!
LoadStringW
(
get_shdoclc
(),
IDS_MESSAGE_BOX_TITLE
,
wszTitle
,
sizeof
(
wszTitle
)
/
sizeof
(
WCHAR
)))
{
WARN
(
"Could not load message box title: %d
\n
"
,
GetLastError
());
EndDialog
(
hwnd
,
wparam
);
return
FALSE
;
}
SetWindowLongPtrW
(
hwnd
,
DWLP_USER
,
lparam
);
SetWindowTextW
(
hwnd
,
wszTitle
);
SetWindowTextW
(
GetDlgItem
(
hwnd
,
ID_PROMPT_PROMPT
),
arg
->
message
);
SetWindowTextW
(
GetDlgItem
(
hwnd
,
ID_PROMPT_EDIT
),
arg
->
dststr
);
return
FALSE
;
}
case
WM_COMMAND
:
switch
(
wparam
)
{
case
MAKEWPARAM
(
IDCANCEL
,
BN_CLICKED
):
EndDialog
(
hwnd
,
wparam
);
return
TRUE
;
case
MAKEWPARAM
(
IDOK
,
BN_CLICKED
):
{
prompt_arg
*
arg
=
(
prompt_arg
*
)
GetWindowLongPtrW
(
hwnd
,
DWLP_USER
);
HWND
hwndPrompt
=
GetDlgItem
(
hwnd
,
ID_PROMPT_EDIT
);
INT
len
=
GetWindowTextLengthW
(
hwndPrompt
);
if
(
!
arg
->
textdata
)
{
EndDialog
(
hwnd
,
wparam
);
return
TRUE
;
}
V_VT
(
arg
->
textdata
)
=
VT_BSTR
;
if
(
!
len
&&
!
arg
->
dststr
)
V_BSTR
(
arg
->
textdata
)
=
NULL
;
else
{
V_BSTR
(
arg
->
textdata
)
=
SysAllocStringLen
(
NULL
,
len
);
GetWindowTextW
(
hwndPrompt
,
V_BSTR
(
arg
->
textdata
),
len
+
1
);
}
EndDialog
(
hwnd
,
wparam
);
return
TRUE
;
}
}
return
FALSE
;
case
WM_CLOSE
:
EndDialog
(
hwnd
,
IDCANCEL
);
return
TRUE
;
default:
return
FALSE
;
}
}
static
HRESULT
WINAPI
HTMLWindow2_prompt
(
IHTMLWindow2
*
iface
,
BSTR
message
,
BSTR
dststr
,
VARIANT
*
textdata
)
{
HTMLWindow
*
This
=
HTMLWINDOW2_THIS
(
iface
);
FIXME
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_w
(
message
),
debugstr_w
(
dststr
),
textdata
);
return
E_NOTIMPL
;
prompt_arg
arg
;
TRACE
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_w
(
message
),
debugstr_w
(
dststr
),
textdata
);
if
(
textdata
)
V_VT
(
textdata
)
=
VT_NULL
;
arg
.
message
=
message
;
arg
.
dststr
=
dststr
;
arg
.
textdata
=
textdata
;
DialogBoxParamW
(
hInst
,
MAKEINTRESOURCEW
(
ID_PROMPT_DIALOG
),
This
->
doc
->
hwnd
,
prompt_dlgproc
,
(
LPARAM
)
&
arg
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLWindow2_get_Image
(
IHTMLWindow2
*
iface
,
IHTMLImageElementFactory
**
p
)
...
...
dlls/mshtml/resource.h
View file @
147cf1da
...
...
@@ -26,6 +26,10 @@
#define ID_DWL_INSTALL 7602
#define ID_DWL_STATUS 7603
#define ID_PROMPT_DIALOG 7700
#define ID_PROMPT_PROMPT 7701
#define ID_PROMPT_EDIT 7702
#define IDS_MESSAGE_BOX_TITLE 2213
#define IDS_PRINT_HEADER_TEMPLATE 8403
...
...
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