欢迎访问:常州市武进区嘉泽中心小学网站 !今天是:
栏目列表
您现在的位置是:首页>>教师>>计算机技术>>程序设计>>杂项>>文章内容
CWinApp::Enable3dControls 在VS2005中也不支持了
发布时间:2008-11-20   点击:   来源:本站原创   录入者:佚名
 

在VS2005中,CWinApp::InitInstance里变化还是挺大的

从VC6升级上的程序,要改一下,才能运行
基本上把
 AfxEnableControlContainer();

 // Standard initialization
 // If you are not using these features and wish to reduce the size
 //  of your final executable, you should remove from the following
 //  the specific initialization routines you do not need.

#ifdef _AFXDLL
 Enable3dControls();   // Call this when using MFC in a shared DLL
#else
 Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
改为
// InitCommonControlsEx() is required on Windows XP if an application
 // manifest specifies use of ComCtl32.dll version 6 or later to enable
 // visual styles.  Otherwise, any window creation will fail.
 INITCOMMONCONTROLSEX InitCtrls;
 InitCtrls.dwSize = sizeof(InitCtrls);
 // Set this to include all the common control classes you want to use
 // in your application.
 InitCtrls.dwICC = ICC_WIN95_CLASSES;
 InitCommonControlsEx(&InitCtrls);

 CWinApp::InitInstance();

 // Initialize OLE libraries
 if (!AfxOleInit())
 {
  AfxMessageBox(IDP_OLE_INIT_FAILED);
  return FALSE;
 }
 AfxEnableControlContainer();


附件:
    关闭窗口
    打印文档
    账号登录
    保持登录 忘记密码?
    账号与武进教师培训平台同步