Link to home
Start Free TrialLog in
Avatar of LPlate
LPlate

asked on

Common Dialog Box in WinCE (evc++ API)

Hi People,

I'm trying to load a common dialog box on a Pocket PC, but my Common Dailog fails to load. when i call the GetLastError function it display 120 what does this mean???

I have list my code below so that you can get a better understand

      int rnet;
      OPENFILENAME ofn;
      TCHAR szFile[MAX_PATH+1] = {0};
      memset(&ofn, 0, sizeof(ofn));
      // Fill out data structure
      ofn.hInstance         = GetModuleHandle(NULL);
      ofn.lpstrCustomFilter = 0;
      ofn.lpstrInitialDir   = 0;
      ofn.lStructSize = sizeof(ofn);
      ofn.lpstrFilter = TEXT("Image Files (*.Log)\0*.log\0All Files (*.*)\0*.*\0");
      ofn.lpstrFile = szFile;
      ofn.nMaxFile = MAX_PATH;
      ofn.lpstrTitle = TEXT("Open Squeak image ...");
      ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
      ofn.lpstrDefExt = TEXT("image");
      ofn.hwndOwner = hDlg;

      // Show dialog
      if (!GetSaveFileName(&ofn))
      {
                   rnet = GetLastError();
            Printf(L"Failed to Display Dialog BOX");
            Printf(L"GetLastError = %d",rnet);
            return FILE_ERROR;
      }

      return FILE_OK;



I developing in eVC++ 3.0 using API calls not MFC.

Avatar of AlexFM
AlexFM

120 means "This function is not supported on this system".
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: AlexFM {http:#9787069} & RJSoft {http:#9808261}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer