OnCreateClientが呼ばれない
Posted: 2010年11月15日(月) 20:52
何がいけないのでしょうか。
お願いします。
#include "stdafx.h"
class myFrameWnd: public CFrameWnd
{
public:
myFrameWnd();
virtual BOOL OnCreateClient(LPCREATESTRUCT,CCreateContext);
afx_msg int OnCreate(LPCREATESTRUCT);
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(myFrameWnd,CFrameWnd)
ON_WM_CREATE()
END_MESSAGE_MAP()
myFrameWnd::myFrameWnd()
{
Create(NULL,"HELLO");
ShowWindow(TRUE);
}
BOOL myFrameWnd::OnCreateClient(LPCREATESTRUCT,CCreateContext)
{
MessageBox("createclient");
return TRUE;
}
int myFrameWnd::OnCreate(LPCREATESTRUCT)
{
MessageBox("create");
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
return 0;
}
class myApp: public CWinApp
{
BOOL InitInstance();
};
BOOL myApp::InitInstance()
{
myFrameWnd* wnd=new myFrameWnd();
if(!wnd) return FALSE;
m_pMainWnd=wnd;
return TRUE;
}
myApp theApp;
お願いします。
#include "stdafx.h"
class myFrameWnd: public CFrameWnd
{
public:
myFrameWnd();
virtual BOOL OnCreateClient(LPCREATESTRUCT,CCreateContext);
afx_msg int OnCreate(LPCREATESTRUCT);
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(myFrameWnd,CFrameWnd)
ON_WM_CREATE()
END_MESSAGE_MAP()
myFrameWnd::myFrameWnd()
{
Create(NULL,"HELLO");
ShowWindow(TRUE);
}
BOOL myFrameWnd::OnCreateClient(LPCREATESTRUCT,CCreateContext)
{
MessageBox("createclient");
return TRUE;
}
int myFrameWnd::OnCreate(LPCREATESTRUCT)
{
MessageBox("create");
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
return 0;
}
class myApp: public CWinApp
{
BOOL InitInstance();
};
BOOL myApp::InitInstance()
{
myFrameWnd* wnd=new myFrameWnd();
if(!wnd) return FALSE;
m_pMainWnd=wnd;
return TRUE;
}
myApp theApp;
