I have IE 9 and Delphi XE2. I am executing IDM_Replace to show the replace dialog for mshtml editable content in a twebbrowser. The dialog opens but there is nothing on it. It is blank.
The IDM_FIND command works as it should. What could be wrong?
EDITED to show code
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;