Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
U

User 11251540

@User 11251540
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MFC app - "Encountered an improper argument"
    U User 11251540

    Thank you, I amended dwFlags to "OFN_ENABLESIZING | OFN_HIDEREADONLY", which even make more sense (having multiselect on saving a file dialog doesn't make much sense) and it works on both XP and 2008 server.

    C / C++ / MFC c++ help visual-studio csharp sysadmin

  • MFC app - "Encountered an improper argument"
    U User 11251540

    BOOL CPasswordGeneratorWriterDlg::SavePasswordFile()
    {
    // Create an instance
    CFileDialog fileDlg(
    FALSE,
    NULL,
    NULL,
    OFN_ALLOWMULTISELECT | OFN_HIDEREADONLY,
    "All Files (*.*)|*.*||",
    NULL);

    // Initializes m\_ofn structure 
    fileDlg.m\_ofn.lpstrTitle = "Save file as...";
    
    // Call DoModal
    if(fileDlg.DoModal() == IDOK)
    {
    	CString szlstfile = fileDlg.GetPathName(); // This is your selected file name with path
    	//AfxMessageBox("Your file name is :" +szlstfile );
    
    	return SavePasswordFileAs(szlstfile);
    }
    return FALSE;
    

    }

    C / C++ / MFC c++ help visual-studio csharp sysadmin

  • MFC app - "Encountered an improper argument"
    U User 11251540

    Hi, I "inherited" an legacy app written some 12 years ago, not being C++ developer since university. I have MS Visual Studio 2010 project out of it, all builds OK. All even runs OK on Windows XP 32 bit(where it's built), but when trying it on Windows 2008 server 64bit, it throws "Encountered an improper argument". More specifically, it's super simple app that displays 2 password fields (second for confirmation), and button for storing generated file on file system (so Save as... dialog). And error shows up when clicking on this button/trying to open Save dialog). When run in debug mode, in same action, it throws Assertion error, pointing to dlgfile.cpp in MFC libs, line 479. The executable is generated with VS settings Multi-threaded Debug DLL as runtime library, and "Use MFC as shared DLL" I would presume that some .dll provided is incorrect version from rest/expected by code, but I have no clue how to find it. Any help on how to fix this is strongly welcomed!

    C / C++ / MFC c++ help visual-studio csharp sysadmin
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups