Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Revision as of 07:22, 14 June 2012 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Archived:Setting a default drive and directory for AknCommonDialogs

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.


Article Metadata
CompatibilityArticle
Created: User:Technical writer 2 (08 Feb 2007)
Last edited: hamishwillee (14 Jun 2012)

Overview

Setting a default drive and directory for AknCommonDialogs

Description

The following code example shows how the AknCommonDialogs class can be used to select the directories from a particular drive.

Solution

In the resources, declare the memory selection dialog as follows:
RESOURCE MEMORYSELECTIONDIALOG r_memory_selection_dialog
    {
    title = "title string";
    softkey_1 = "ok string";
    softkey_2 = "cancel string";
    locations =
        {
        LOCATION
            {
            \\ Replace <drive> with - c: for phone, e: for memory card
            \\ Replace <dir> with default directory
            root_path = "<drive>:\\";
            default_folder = "<drive>:\\<dir>";
            }
        };
    }
// In the cpp file, launch the AknCommonDialogs. RunSaveDlgLD() does not display the folder selection dialog - instead, the resulting path will be constructed from the root and default folder read from resources.
    LIT(filename ,"default"); // default file name to display in dialog
    TBuf<32> default_file_name;
    default_file_name.Copy(filename);
    AknCommonDialogs::RunSaveDlgLD(default_file_name, R_MEMORY_SELECTION_DIALOG);

This page was last modified on 14 June 2012, at 07:22.
30 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×