CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2012
    Posts
    181

    [RESOLVED] Why such code don't invoke Save dialog?

    Code:
          OPENFILENAME Ofn;       // common dialog box structure
           wchar_t szFile[260];    // buffer for file name
    // Initialize OPENFILENAME
           ZeroMemory(&Ofn, sizeof(Ofn));	   
           Ofn.lStructSize = sizeof(OPENFILENAME); 
           Ofn.hwndOwner = hwnd; 
           Ofn.lpstrFilter = L"All\0*.*"; 
           Ofn.lpstrFile = (LPWSTR) szFile; 
           Ofn.nMaxFile = sizeof(szFile)/ sizeof(*szFile); 
           Ofn.lpstrFileTitle = L"Save file"; 
           Ofn.nMaxFileTitle = 9; 
           Ofn.lpstrInitialDir = (LPCWSTR)NULL; 
           Ofn.Flags = OFN_SHOWHELP | OFN_OVERWRITEPROMPT; 
           Ofn.lpstrTitle = szTitle; 
    	   HANDLE hf;
    	   DWORD Written;
    	   if (GetSaveFileName(&Ofn)==TRUE)
    	   {}

  2. #2
    Join Date
    Feb 2012
    Posts
    181

    Re: Why such code don't invoke Save dialog?

    I had changed some parameters and all work...

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured