//NetTalk
/*------------------------------------------------------------------------------*\
 =============================
   模块名称: MsgTalk.h
 =============================
 
 [版权]
 
   2000-2002  115软件工厂  版权所有
                                              
\*------------------------------------------------------------------------------*/
#ifndef _MSGTALK_H_
#define _MSGTALK_H_
#include "GraphDlg.h"
#include "resource.h"

class CMyEdit:public CEditX
{

protected:
	virtual LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
	{
		switch(uMsg)
		{
		case WM_CHAR:
			{
				if(wParam=='\r')
					SendMessage(GetParent(m_hWnd),WM_COMMAND,IDC_SEND,0);
			}
			break;
		}
		return CEditX::WndProc(uMsg,wParam,lParam);
	}
	
};
//////////
class CMsgTalkDlg:public CGraphDlg
{
public:
	void AddMsg(char* pszMsg);
	BOOL Create(HWND hParent);
	
	CMsgTalkDlg();
	virtual  ~CMsgTalkDlg();
protected:
	
	CMyEdit m_MyEdit;

	void LoadList();

	virtual BOOL OnInitDialog();
	virtual BOOL OnCommand(WPARAM wParam,LPARAM lParam);
	virtual LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
};




#endif