// basemsg.cpp : implementation file
//

#include "stdafx.h"
#include "tutorial.h"
#include "basemsg.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CBaseMsg

CBaseMsg::CBaseMsg()
{
}

CBaseMsg::~CBaseMsg()
{
}

BEGIN_MESSAGE_MAP(CBaseMsg, CWnd)
	//{{AFX_MSG_MAP(CBaseMsg)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CBaseMsg message handlers


void CBaseMsg::OnPaint()
{
	CPaintDC dc(this); // device context for painting
	
	// TODO: Add your message handler code here
	/*	
	 CRect   rectMsg;
	 rectMsg.left=WinCxy.x+335;
	 rectMsg.top=WinCxy.y+263;
	 rectMsg.right=rectMsg.left+300;
	 rectMsg.bottom=rectMsg.top+194;
	// ScreenToClient(&rectMsg);
	 rectMsgBlock.SetRect(rectMsg.left+25,
	                      rectMsg.top+36,
	                      rectMsg.left+25+246,
	                      rectMsg.top+36+100);
	                      
	*/

 DrawTPmap(dc,rectMsg,IDB_BITMAP16,IDB_BITMAP17);
 DrawTitle(dc,szCaseTitle,RGB(255,255,0));    
 BOOL bDIP=0;
 if(m_uMsgID!=m_uOldMsgMapID)//if different MsgID Play door effection
   {
    bDIP=1;
    m_uOldMsgMapID=m_uMsgID;
   }
  DisplayMessage(dc,rectMsgBlock,m_uMsgID,1,bDIP);
  if(m_pCancelBtn)
    {
     m_pCancelBtn->Invalidate();
     m_pCancelBtn->UpdateWindow();   
    } 
  if(m_pNextBtn)
    {
     m_pNextBtn->Invalidate();
     m_pNextBtn->UpdateWindow();   
    } 
}
}
