I have used FindFirstFlashCard() and FindNextFlashCard() to locate my
storage card. My WIN32_FIND_DATA structure is m_lpwfdFlashCard, and this
structure's cFileName is set to "Storage Card".

Now I need to learn how to retrieve a file from this storage card.

Using CFileDialog, I tried this:

CFileDialog dlg(TRUE, L"bmp", m_lpwfdFlashCard->cFileName, 0, L"All Files
(*.*)|*.*");

But, the code will still not open to the storage card folder.

Further, the only way I have found to access the storage card using the
emulator device that I am running eVC4-SP4 through is to physically select
the storage card icon from the Pocket PC 2003's File Explorer.

What am I doing wrong?

How do I tell CFileDialog that I want it to open to the Storage Card?

RE: OpenFileDialog for Storage Card by Joe

Joe
Wed Aug 16 14:58:02 CDT 2006

I'm doing something similar. How does one set the CDialog() path to the
storage medium?

"poojo hackma" wrote:

> I have used FindFirstFlashCard() and FindNextFlashCard() to locate my
> storage card. My WIN32_FIND_DATA structure is m_lpwfdFlashCard, and this
> structure's cFileName is set to "Storage Card".
>
> Now I need to learn how to retrieve a file from this storage card.
>
> Using CFileDialog, I tried this:
>
> CFileDialog dlg(TRUE, L"bmp", m_lpwfdFlashCard->cFileName, 0, L"All Files
> (*.*)|*.*");
>
> But, the code will still not open to the storage card folder.
>
> Further, the only way I have found to access the storage card using the
> emulator device that I am running eVC4-SP4 through is to physically select
> the storage card icon from the Pocket PC 2003's File Explorer.
>
> What am I doing wrong?
>
> How do I tell CFileDialog that I want it to open to the Storage Card?
>
>
>

Re: OpenFileDialog for Storage Card by r_z_aret

r_z_aret
Wed Aug 16 17:06:03 CDT 2006

On Tue, 15 Aug 2006 16:20:49 -0500, "poojo hackma" <poojo.com/mail>
wrote:

>I have used FindFirstFlashCard() and FindNextFlashCard() to locate my
>storage card. My WIN32_FIND_DATA structure is m_lpwfdFlashCard, and this
>structure's cFileName is set to "Storage Card".
>
>Now I need to learn how to retrieve a file from this storage card.

FindFirstFlashCard and FindNextFlashCard found the root name for the
files on the card. Build the full path to any file you want by
appending all nested folders and the name of the file. So a file
called myfile.txt in a folder called onesub would have a full path:
\Storage Card\onesub\myfile.txt


>
>Using CFileDialog, I tried this:
>
> CFileDialog dlg(TRUE, L"bmp", m_lpwfdFlashCard->cFileName, 0, L"All Files
>(*.*)|*.*");
>
>But, the code will still not open to the storage card folder.

I'm not quite sure what you mean, but I _think_ the answer is in a
current thread called "openFileDialog ignores InitialDirectory"


>
>Further, the only way I have found to access the storage card using the
>emulator device that I am running eVC4-SP4 through is to physically select
>the storage card icon from the Pocket PC 2003's File Explorer.
>
>What am I doing wrong?
>
>How do I tell CFileDialog that I want it to open to the Storage Card?
>

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com

Re: OpenFileDialog for Storage Card by poojo

poojo
Wed Aug 16 16:59:34 CDT 2006

I am using the Pocket PC 2003 Emulator, and sometimes the file will load,
sometimes it will not. Strange.

I looked at the thread you suggested. In it, you said if I "choose "All
Folders" in the combo box, the list shows all folders in main memory _and_ a
storage card", then I will be blessed with a special icon. The *only* files
that appears in my combo box are those from the Templates directory, not the
Shared Folder that I have set up to be my added storage drive.

Does the Shared Folder not work as a simulated Storage Device?
FindFirstFlashCard() located it, so I am taking it that it works. Is this
wrong?



Re: OpenFileDialog for Storage Card by poojo

poojo
Thu Aug 17 16:16:15 CDT 2006

A further note:

I noticed that on my Pocket PC Emulator, the storage card does not appear in
my File Explorer ListView. It does appear as an Icon on the bottom of the
screen sandwiched between the Pocket PC icon and the Network icon.

On my Pocket PC Device, the storage card does appear in my File Explorer
ListView as a folder with a memory chip painted on it.

Also, on the Pocket PC Device, I can open Pocket Word, and on the Tools menu
select "File > Save Document As..." to view Pocket Word's "Save As" Dialog.
The difference here with this dialog is that it includes a "Location:" combo
box with "Main Memory" and "Storage Card" as options.

Is there something I need to set to enable Location to be displayed (maybe
something inside the OPENFILENAME structure), or is this a different type of
Dialog Box?



Re: OpenFileDialog for Storage Card by JimMcGhee

JimMcGhee
Fri Aug 18 10:38:45 CDT 2006

I was not able to get OpenFileDialog to find a sd card. I ended up writing
my own dialog. Sorry, I know that's not what you want to hear.
I'm following this thread hoping someone will prove me wrong. ;)
Jim

"poojo hackma" wrote:

> A further note:
>
> I noticed that on my Pocket PC Emulator, the storage card does not appear in
> my File Explorer ListView. It does appear as an Icon on the bottom of the
> screen sandwiched between the Pocket PC icon and the Network icon.
>
> On my Pocket PC Device, the storage card does appear in my File Explorer
> ListView as a folder with a memory chip painted on it.
>
> Also, on the Pocket PC Device, I can open Pocket Word, and on the Tools menu
> select "File > Save Document As..." to view Pocket Word's "Save As" Dialog.
> The difference here with this dialog is that it includes a "Location:" combo
> box with "Main Memory" and "Storage Card" as options.
>
> Is there something I need to set to enable Location to be displayed (maybe
> something inside the OPENFILENAME structure), or is this a different type of
> Dialog Box?
>
>
>

Re: OpenFileDialog for Storage Card by poojo

poojo
Mon Aug 21 14:36:18 CDT 2006

Hi Jim,

Did you have to create an entirely new form or were you able to start with
the CDialog form and add from there?

Though adding to the CDialog class would be more efficient, I have no idea
how I would go about adding elements (like a new CComboBox) to it. I'm just
not that good!

If you developed a class that derived from CDialog, could you show some
code?

Regards,
poojo

>I was not able to get OpenFileDialog to find a sd card. I ended up writing
> my own dialog. Sorry, I know that's not what you want to hear.
> I'm following this thread hoping someone will prove me wrong. ;)
> Jim



Re: OpenFileDialog for Storage Card by poojo

poojo
Tue Aug 22 09:53:35 CDT 2006

Sorry. I meant CFileDialog.

Further, I have since found that CFileDialog can not be inherited. I guess
I have to create my own dialog box.

> If you developed a class that derived from CDialog, could you show some
> code?
>
> Regards,
> poojo