Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    6

    Fileselection dialog ignores rss file

    Hello!

    I want to use Fileselectiondialog - in SDK 1.2 i have found "AVKONCommon File Dialogs Usage". There I can find some example. I use:

    rss file:

    #include <CommonDialogs.hrh>
    #include <CommonDialogs.rh>

    RESOURCE FILESELECTIONDIALOG r_hairstyle_file_selection_dialog
    {
    title = "Select a file:";
    root_path = "C:\\nokia\\";
    default_folder = "C:\\nokia\\images\\";
    filters =
    {
    FILTER
    {
    filter_type = EFilenameFilter;
    filter_style = EInclusiveFilter;
    filter_data = {"*.jpg", "*.gif", "*.bmp"};
    }
    };
    }

    and in source code:

    TFileName aSelectedFileName; // descriptor for storing selected filename [dialogs]
    AknCommonDialogs::RunSelectDlgLD (aSelectedFileName, R_HAIRSTYLE_FILE_SELECTION_DIALOG);


    Dialog is shown and I can browse, ,select file. But, it totally ignores root_path, default_folder, title, filters. Browsing starts at C:\ and all files are shown.

    However, in AVKON Common File Dialogs Usage is an error: page 5/7 in example resource of file selection dialog:

    there are:
    FILTER
    {
    filtertype = EAttributeFilter;
    filterstyle = EExclusiveFilter;
    filterdata = {"SH", "R"} ;
    }

    should be replaced with:

    FILTER
    {
    filter_type = EAttributeFilter;
    filter_style = EExclusiveFilter;
    filter_data = {"SH", "R"} ;
    }


    Thanks in advance

    Josie60
    ani-p@o2.pl

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    3
    Hi,

    I'm not sure but I think that the default_folder should be set only too "images\\".

    See commondialogs.rh description for LOCATION struct.

    Best regards,
    Thomas.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Root + Default folder for FILESELECTIONDIALOG

    Hi Josie and Thomasson,

    did you succeed to give pass root and default folder to the file selection dialog ? In my case I also observe the same behaviour. No matter what settings I make in the resource file for root_path and default_path browsing always starts at "C:\\" and it shows all files (but not the system folder - how to display this ?).

    Kind regards,

    Rene Heuven

  4. #4
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Other methods/classes in commondialogs.dll

    Hi,

    I ran dumpbin over commondialogs.dll - it shows also shows classes like CAknFileNamePromptDialog as being exported. Unfortunately the code I created to use this class crashes. Is anyone using these functions ? With any success ? Does anyone know how to create a header file from an export dump using dumpbin ?

    Kind regards,

    Rene Heuven

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×