Me
2012-11-23 21:53:16 UTC
I am attempting to upgrade to VS2010 from apps running under VS6
In my main Dialog's .cpp program I have the following under VC6 which works
fine:
BOOL CAdelphiPDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
BOOL bNameValid;
CString strAboutMenu;
bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX);
ASSERT(bNameValid);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
CRect tabRect;
m_cTab.GetWindowRect(tabRect);
m_rSettingsRect.left = 10; // Set the size and location of child
m_rSettingsRect.top = 40;
m_rSettingsRect.right = tabRect.Width() - 20;
m_rSettingsRect.bottom = tabRect.Height() - 44;
m_dPreset1.Create(IDD_PRESET1, this); // Create the child windows
m_dOptions.Create(IDD_OPTIONS, this);
// rest of sartup code here
return true;
}
When I try the same thing under VC++ 2010 I get error's compiling at the
lines:
m_dPreset1.Create(IDD_PRESET1, this); // Create
the child windows for the main window class
m_dOptions.Create(IDD_OPTIONS, this);
Both lines have the IDD_ tags and this underlined in red and the compiler
states:
error C2660: 'CWnd::Create' : function does not take 2 arguments
It works fine under Visual C++ 6.0 but not under Visual C++ 2010
I am having trouble finding correction info.
These two lines are the only ones giving errors.
Can someone help me with the correction please!
In my main Dialog's .cpp program I have the following under VC6 which works
fine:
BOOL CAdelphiPDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
BOOL bNameValid;
CString strAboutMenu;
bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX);
ASSERT(bNameValid);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
CRect tabRect;
m_cTab.GetWindowRect(tabRect);
m_rSettingsRect.left = 10; // Set the size and location of child
m_rSettingsRect.top = 40;
m_rSettingsRect.right = tabRect.Width() - 20;
m_rSettingsRect.bottom = tabRect.Height() - 44;
m_dPreset1.Create(IDD_PRESET1, this); // Create the child windows
m_dOptions.Create(IDD_OPTIONS, this);
// rest of sartup code here
return true;
}
When I try the same thing under VC++ 2010 I get error's compiling at the
lines:
m_dPreset1.Create(IDD_PRESET1, this); // Create
the child windows for the main window class
m_dOptions.Create(IDD_OPTIONS, this);
Both lines have the IDD_ tags and this underlined in red and the compiler
states:
error C2660: 'CWnd::Create' : function does not take 2 arguments
It works fine under Visual C++ 6.0 but not under Visual C++ 2010
I am having trouble finding correction info.
These two lines are the only ones giving errors.
Can someone help me with the correction please!