I have Windows 7 on my pc.
I read that the GetOpenFileName was repaced by the IFileDialog interface.
How can I use it ?
I need some example.
Thanks
GetOpenFilename is still available and will not be deprecated since older software uses it exclusively. For IFileDialog you generally do not call it directly, it is implemented by IFileOpenDialog and IFileSaveDialog which are the two interfaces you would normally call. There is also an event sink that allows you to process events during the lifespan of the dialog, IFileDialogEvents. You can customize the file dialog using IFileDialogCustomize.
This is not a lightweight COM interface, it requires setting up a static COM server to handle events so it's not really something for anyone without COM experience unless you want just the bare bones implementation.
Thanks for the answer, I asked about this because I have problems using GetOpenfilename with ml64 (invalid structure size !).
In x64 the structure should be 152 bytes.
I will check the structure alignment.
Thanks.