Real Software Forums
http://forums.realsoftware.com/

Modern Style FolderItemDialog, OpenDialog, SaveAsDialog
http://forums.realsoftware.com/viewtopic.php?f=6&t=43461
Page 1 of 1

Author:  jjfcpa [ Tue Apr 03, 2012 10:11 am ]
Post subject:  Modern Style FolderItemDialog, OpenDialog, SaveAsDialog

I am using OpenDialog on Windows 7 and the results do not match what is shown in the documentation at http://docs.realsoftware.com/index.php/OpenDialog. Same goes for the SaveAsDialog. I would prefer the newer style dialog as shown in the docs, but instead I am getting the old style dialog, which has much more limited navigation and feels a bit dated. Is there any way to get the new style dialog? This image shows what I mean. I want the one on the left, but I am getting the one on the right:

Image

Author:  simulanics [ Tue Apr 03, 2012 9:35 pm ]
Post subject:  Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog

jjfcpa wrote:
I am using OpenDialog on Windows 7 and the results do not match what is shown in the documentation at http://docs.realsoftware.com/index.php/OpenDialog. Same goes for the SaveAsDialog. I would prefer the newer style dialog as shown in the docs, but instead I am getting the old style dialog, which has much more limited navigation and feels a bit dated. Is there any way to get the new style dialog? This image shows what I mean. I want the one on the left, but I am getting the one on the right:

Image


RS uses cross-platform dialogs. If you would like the windows vista/7 "feel", you will need to invoke dialogs by using the Windows API :-) You can toss a #if targetbuild setup to ensure your application remains cross-platform compatible if not for windows only builds...API varies from OS to OS :-)

Here is the Windows API for OpenDialog
http://support.microsoft.com/kb/161286
The article is for vb.net...although declaring the API and utilizing it will be very similar in RS...

Don't forget to use a new Structure for "Private Type OPENFILENAME"

Author:  jjfcpa [ Wed Apr 04, 2012 9:54 am ]
Post subject:  Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog

Thanks for the link. I might try that, but I disagree with your premise.

simulanics wrote:
RS uses cross-platform dialogs.


The dialog that RS displays is not a custom cross-platform dialog like you might see in Java or Qt applications. It is a native Windows dialog on Windows and a native Mac dialog on Mac. This leads me to believe that RS is using the Windows API internally, but they are using the older API instead of the new one.

I am also still wondering why the documentation shows the new dialog but that's not what I get.

Edit: I tested it on Vista, using the sample code from the documentation at http://docs.realsoftware.com/index.php/OpenDialog and the dialog that appears does not match the screenshot on that very same page.

Author:  classone [ Wed Apr 04, 2012 10:17 am ]
Post subject:  Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog

Quote:
RS is using the Windows API internally, but they are using the older API instead of the new one.

...and you are probably correct. Please file a feedback report.

Author:  simulanics [ Wed Apr 04, 2012 1:41 pm ]
Post subject:  Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog

I agree with the older API as well. :-p definitely file a case report.. Or let one of us know you wish not to so one of us can :-)

Author:  jjfcpa [ Thu Apr 05, 2012 10:27 am ]
Post subject:  Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog

I was hoping that someone would tell me I was doing something wrong or give me some magic combination of parameters. Instead I have submitted feedback with case number 20850.

<feedback://showreport?report_id=20850>

Author:  NaNdummy [ Thu Apr 05, 2012 11:42 am ]
Post subject:  Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog

On mac, RB also uses another API. There you can use the MBS Plugin to correct that. May that works also for windows.

Author:  simulanics [ Thu Apr 05, 2012 1:54 pm ]
Post subject:  Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog

jjfcpa wrote:
Thanks for the link. I might try that, but I disagree with your premise.

simulanics wrote:
RS uses cross-platform dialogs.


The dialog that RS displays is not a custom cross-platform dialog like you might see in Java or Qt applications. It is a native Windows dialog on Windows and a native Mac dialog on Mac. This leads me to believe that RS is using the Windows API internally, but they are using the older API instead of the new one.

I am also still wondering why the documentation shows the new dialog but that's not what I get.

Edit: I tested it on Vista, using the sample code from the documentation at http://docs.realsoftware.com/index.php/OpenDialog and the dialog that appears does not match the screenshot on that very same page.


Just finished a googlemap class for someone else...tonight will work on a "native" system dialog class for you :-)

Author:  jjfcpa [ Thu Apr 05, 2012 3:44 pm ]
Post subject:  Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog

simulanics wrote:
Just finished a googlemap class for someone else...tonight will work on a "native" system dialog class for you :-)


That would be great! By the way, the link in your earlier post is from 2004, so I think it probably refers to the old style dialogs. I think the new ones are called "Common Item Dialogs" and can be implemented by IFileDialog, IFileOpenDialog, and IFileSaveDialog. These are described in this more recent article:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb776913(v=vs.85).aspx

Author:  simulanics [ Sun Apr 08, 2012 8:53 pm ]
Post subject:  Re: Modern Style FolderItemDialog, OpenDialog, SaveAsDialog

Ok, so after extensive searching and experimenting...RS cannot implement the Modern Windows Styles (itself alone) ...although...as an alternative, I've started making a plugin (C++ can access the API's [part of .NET ewww]) which can create the modern styles you desire. Working on the code a little bit more til it satisfactorily works and will post the code as an open-source project. :-)

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/