Pelles C forum
C language => Pocket PC and Smartphone questions => Topic started by: jasch212 on March 14, 2010, 03:47:43 PM
-
hello,
i use the following code to open a file (by user request)
WCHAR wszFile[MAX_PATH] = L"\0";
OPENFILENAME ofn = {0};
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = hwnd;
ofn.lpstrFile = wszFile;
ofn.nMaxFile = MAX_PATH;
ofn.lpstrFilter = L"All\0*.*\0Text\0*.TXT\0";//L"All (*.*)\0*.*\0";
ofn.lpstrTitle = L"Open GPX File";
ofn.Flags = OFN_EXPLORER | OFN_NOCHANGEDIR;
ofn.lpstrInitialDir = NULL;
if (GetOpenFileName(&ofn))
ShowInfo(hwnd, ofn.lpstrFile);
in the openMenue i cound't change the directory to myStorageCard???
and i see not all directorys.
anyone a hint.
Thomas
-
Hello Thomas,
I don't know why you can't see/change all directorys.
I found only two little Erros in your structur.
1) the lpstrFilter must closed with "\0\0" (double NULL)
2) Both "ofn.Flags" are not supported in Windows CE
I hope if you change this, its work fine.
Bye Kaljj
-
OK thanks Kaljj,
double NULL was the Problem.
Bye thomas