void CanvasForm::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
TRACE("ONTIMER\n");
//MessageBox("hello");
CFrameWnd::OnTimer(nIDEvent);
}int CanvasForm::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
SetTimer(1,1000,NULL);
MessageBox("hello");
TRACE("SETTIMER");
// TODO: Add your specialized creation code here
return 0;
}
{
// TODO: Add your message handler code here and/or call default
TRACE("ONTIMER\n");
//MessageBox("hello");
CFrameWnd::OnTimer(nIDEvent);
}int CanvasForm::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
SetTimer(1,1000,NULL);
MessageBox("hello");
TRACE("SETTIMER");
// TODO: Add your specialized creation code here
return 0;
}
这不是一个对话框, 我这是编的一个游戏程序,要在CanvasForm里显示,
messagebox就是一个弹出框和CanvasForm 没有关系,CanvasForm那个框当然没有关闭