Hi, Is there any way to add a text box into the subj?
I've tried to follow to some MS instructions, but have got a failure - the text edit box is added, but I can't get its text back, so it's just useless.
I'm doing the next:
In OnExecute:
procedure TFMain.SD1Execute(Sender: TObject);
var
c : IFileDialogCustomize;
r : HResult;
pc : PChar;
begin
if Supports(SD1.Dialog, IFileDialogCustomize, c) then
begin
c.StartVisualGroup(SVDLG_GRP, 'Комментарий');
c.AddEditBox(SVDLG_CMT, 'some text');
c.EndVisualGroup;
end;
end;
In OnFileOK:
procedure TFMain.SD1FileOkClick(Sender: TObject; var CanClose: Boolean);
var
c : IFileDialogCustomize;
pc : PChar;
r : HRESULT;
begin
if Supports(SD1.Dialog, IFileDialogCustomize, c) then
begin
pc := nil;
r := c.GetEditBoxText(SVDLG_CMT, pc); <<<<< nil is returned here, though r = S_OK
if (r = S_OK) and Assigned(pc) then
begin
SvDlgComment := pc;
CoTaskMemFree(pc);
end;
end;
end;
I'm using Win 7 x64 with Delphi XE7
Is there a solution?
Thanks
Comments
Obviously you have an incorrect interface declaration.
What it would be really great, is to find some hack to enlarge the edit control horizontally, but this is yet unrelated question.