MFC默认是把一些操作和窗口位置写入注册表,怎么默认不写入注册表,每次启动都按照开始的位置摆放

解决方案 »

  1.   

    不一定是注册表吧,也可能是VS.EXE目录下记录的
      

  2.   

    App类的InitInstance函数中有这么一句(SDI/MDI中有,对话框工程没有这个):
    // Change the registry key under which our settings are stored.
    // TODO: You should modify this string to be something appropriate
    // such as the name of your company or organization.
    SetRegistryKey(_T("Local AppWizard-Generated Applications")); LoadStdProfileSettings();  // Load standard INI file options (including MRU)
      

  3.   

    膜拜LS   记得好像以前学MFC内部架构 默认是不写入注册表的吧? 写注册表需要自己写API
      

  4.   

    好吧 我错了  SetRegistryKey(_T("应用程序向导生成的本地应用程序"));
    LoadStdProfileSettings(4);  // 加载标准 INI
      

  5.   

    ....SetRegistryKey(_T("应用程序向导生成的本地应用程序"));
    LoadStdProfileSettings(4); // 加载标准 INI 
    这两句一删就报错 试过了...
      

  6.   

    我也试了
    没报错
    2008MFC单文档