我有IE 9和Delphi XE2。我正在执行IDM_Replace以在twebbrowser中显示mshtml可编辑内容的替换对话框。对话框打开但没有任何内容。这是空白的。
IDM_FIND命令可以正常工作。可能有什么不对?
已编辑以显示代码
execidmcommand_out(IDM_replace); // does work but shows blank dialog
execidmcommand_out(IDM_Find); // Works fine and so does other idm commands
procedure TForm2.execidmcommand_out(const command: Integer);
var
Target: IOleCommandTarget;
Valin, Valout: OleVariant;
PtrGUID: PGUID;
outdoc2:ihtmldocument2;
begin
outdoc2:=webbrowser1.document as ihtmldocument2;
outdoc2.QueryInterface(IID_IOleCommandTarget, Target);
New(PtrGUID);
PtrGUID^ := CGID_MSHTML;
// Valin := 1;
Target.Exec(PtrGUID, command, 0, Valin, Valout);
Dispose(PtrGUID);
end;