siFileSaveDialog and OnTypeChange

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
tportoff
Posts: 10
Joined: Fri May 16, 2008 4:42 pm

siFileSaveDialog and OnTypeChange

Post by tportoff »

Hello,
we are using the OnTypeChange Event of the siFileSaveDialog to change the extension of the filename displayed in the dialog.

To change the filename we use the good old SendMessage function:

SendMessageW(H, CDM_SETCONTROLTEXT, edt1, integer(PWideChar(WideString(S))));

This works fine with XP, but not with Vista and Win7. Is there any work around or any support for the new CommonDialog Interfaces of Vista and Win7? Or is there a chance to use the XP Dialogs? Setting OldStyle to true results in Win 3.11 Dialogs...that is too old :)

thanks,
Torsten

Delphi 2009 / siLang Version 6.4
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hello,

Vista dialogs have almost completely different content as well as controls and so on. So I suppose the message is sent to not the appropriate control or this control doesn't handle/allow such change. You can either try to find the proper control handle using some Windows Spy software line WinSpector or to disable VISTA_DIALOGS define in SI.INC file and re-build your project. Disabling VISTA_DIALOGS define will let you "old XP-style" dialogs which should work just fine.
Best regards,
Igor Siticov.
tportoff
Posts: 10
Joined: Fri May 16, 2008 4:42 pm

siFileSaveDialog

Post by tportoff »

Hello Igor,

thanks for the Info about the si.inc file. Yes, Vista and Win7 dialogs are really a complete different thing. Microsoft has the new IFileDialog interface for the common dialogs. No chance to access the controls of the new dialogs.
It's really not easy to create Apps, that work with Win2000, XP, Vista and Win7.

Well, not a Problem of the siSaveDialog. It's much more a problem of the TSaveDialog.


thanks,
Torsten
Post Reply