AfxGetMainWnd() MS VC++ 6.0 et MS VC++.NET 2003
Bonjour,
Je suis entrain demigrer un code de MS C++ 6.0 pour MS C++.NET 2003,
Code:
1 2 3 4 5 6 7 8
|
void CControlSocket::OnAccept(SOCKET Server)
{
if((CFullScreenWnd*)AfxGetMainWnd()!=NULL)
{
(CFullScreenWnd*)AfxGetMainWnd()->AcceptSocket();
}
} |
il fonctionne correctement sous 6.0 mais avec VC++.NET, l´appelle
Code:
1 2
|
(CFullScreenWnd*)AfxGetMainWnd()!=NULL |
renvoie NULL ce que je ne comprends pas et ca me fait croire qu´il y a une difference d´implementation de la fonction AfxGetMainWnd() chez Microsoft.
Je serais heureux si quelqu´un pouvait m´aider.
Merci bien.
Armand
Pense à mettre la balise de code, Merci Farscape