张
张鸿林
Unregistered / Unconfirmed
GUEST, unregistred user!
包括TOpenDialog控件的ActiveX或Com,在Delphi中作为组件调用<br>返回的TOpenDialog.Filename正确<br>但如果通过IE调用,返回乱码,我想是Dialogs.pas下列函数有问题<br>(肯定是widestring和string的兼容问题)<br><br>function TOpenDialog.GetFileName: TFileName;<br>var<br> Path: array[0..MAX_PATH] of Char;<br>begin<br> if NewStyleControls and (FHandle <> 0) then<br> begin<br> SendMessage(GetParent(FHandle), CDM_GETFILEPATH, SizeOf(Path), Integer(@Path));<br> Result := StrPas(Path);<br> end<br> else Result := FFileName;<br>end;<br>