2011-02-14 09:53 AM - last edited on 2023-08-03 10:22 AM by Doreena Deng
DG::FileDialog dlg (DG::FileDialog::Save); dlg.SetTitle ("Save File"); dlg.SetOKButtonText ("Save"); dlg.SetCancelButtonText ("Cancel"); dlg.SelectFile (IO::Location ("./Text1.txt.txt")); dlg.Invoke(); int count = dlg.GetSelectionCount ();Is this a bug
2011-02-14 11:25 PM
Paodekcal wrote:You could try using
Text file saving problem Only 2 question
1. Why I have to type ./Text1.txt.txt To Get The file dialog work
2. How can I filter only text file using DG::FileDialog
2011-02-15 03:40 AM
2011-02-15 12:59 PM
Paodekcal wrote:In the past, there was example code for this with the API. It's missing in more recent releases, but please find the original code below:
I can find. But I don't know how to use.
Do you have any example code?
I don't know what meaning of the parameter to use.
DGTypePopupItem popup[1] = { {"Text File", "txt", 'TEXT'} }; CIO::Location loc; long typeID; CIO::Location defLoc("Text1.txt"); if (!DGGetSaveFile (&loc, &typeID, 1, popup, &defLoc, "DGTest: Save File", DG_OF_DONT_DISPLAY_EXTENSIONS | DG_OF_NO_ROOT_GROUP)) { return (false); }
2011-02-16 03:31 AM