VC6工程转到.net下面时出现的问题,不知道怎么解决好
在工程里使用了SetDialogBkColor这个函数,而.net下出现警告并且没有成功调用这个函数,具体如下:
BOOL CTimeBoxApp::InitInstance()
{
AfxEnableControlContainer();
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
SetDialogBkColor( RGB( 231, 231, 231 ) );
//显示对话框
//..........
//
}
这个部分.net提示警告:
warning C4996: “CWinApp::Enable3dControls”被声明为否决的
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxwin.h(4369) : 参见“CWinApp::Enable3dControls”的声明
warning C4996: “CWinApp::SetDialogBkColor”被声明为否决的
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxwin.h(4360) : 参见“CWinApp::SetDialogBkColor”的声明
如果要修改程序重载OnCtlColor,则有很多代码要修改,有没有方法可以直接让SetDialogBkColor有效