FileDialog OnTypeChange イベントで FileDialog の FileTypeIndex を取得する方法は?
function TFileDialogEvent.OnTypeChange(const pfd: IFileDialog):
HResult; stdcall;
var
iCaption: string;
iFilename: PWideChar;
begin
{Get the current filename}
pfd.GetFileName(iFilename);
{Get the classname of the dialog to set the caption}
if FClassName = 'TIEWin7FileOpenDialog' then
iCaption := 'Open- ' + iFilename
else
iCaption := 'Save As- ' + iFilename;
pfd.SetTitle(PWideChar(iCaption));
FileTypeIndex := pfd.GetFileTypeIndex(???);
end;