Voici mon code si quelqu'un peut me dire pourquoi cela ne fonctionne pas ! Merci d'avance !!!
#include "stdafx.h"
#include "form1.h"
#include "mdi.h"
/////////////////////////////////////////////////////////////////////////////
// CForm1Wnd Member Functions
BEGIN_MESSAGE_MAP(CForm1Wnd, CMDIChildWnd)
//{{AFX_MSG_MAP(CForm1Wnd)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
CForm1Wnd::CForm1Wnd()
{
CEdit* pEdit = new CEdit;
if (!pEdit->Create(WS_VISIBLE|WS_BORDER,
CRect(10, 10, 100, 100), this, 200))
{
MessageBox("Pas cree", "titre", MB_OK);
}
}
BOOL CForm1Wnd::Create(LPCTSTR szTitle, LONG style /* = 0 */,
const RECT& rect /* = rectDefault */,
CMDIFrameWnd* parent /* = NULL */)
{
LPCTSTR lpszHelloClass =
AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW,
LoadCursor(NULL, IDC_ARROW),
(HBRUSH) (COLOR_WINDOW+1),
LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_HELLO)));
return CMDIChildWnd::Create(lpszHelloClass, szTitle, style, rect, parent);
}