Показать сообщение отдельно
Старый 06.07.2010, 21:36   #1
den
Дэвелопер
 
Аватар для den
 
Регистрация: 13.02.2010
Сообщений: 1,645
Написано 620 полезных сообщений
(для 2,419 пользователей)
Печаль Проблема с класами в MFC

Всем привет!
Недавно у меня возникла следующая проблема в C++, компилятор ругается на строчки:
BOOL CserverDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon

// TODO: Add extra initialization here

m_pListenSocket.SetParentDlg(this); //ругается вот сюда...
m_pConnectSocket.SetParentDlg(this); // ...и сюда
m_pListenSocket.Create(2000); //Создаем сокет на 2000 порту

return TRUE; // return TRUE unless you set the focus to a control
}
Как ругантся:
error C2664: 'CMySocket::SetParentDlg' : cannot convert parameter 1 from 'CserverDlg *const ' to 'CMySocket::CServerDlg *'
и

error C2664: 'CMySocket::SetParentDlg' : cannot convert parameter 1 from 'CserverDlg *const ' to 'CMySocket::CServerDlg *'
Помогите подправить код!
Если надо могу выложить весь проект (пользуюсь Visual Studio 2005)
Взарание спасибо!
(Offline)
 
Ответить с цитированием