MFC通过一个对话框类如何创建多个对话框
对话框类如下#pragma once
#include "resourceppc.h"
#include "friendname.h"
// TalkingDlg 对话框
class TalkingDlg : public CDialog
{
DECLARE_DYNAMIC(TalkingDlg)
public:
TalkingDlg(CWnd* pParent = NULL); // 标准构造函数
virtual ~TalkingDlg();
virtual BOOL OnInitDialog();
// 对话框数据
enum { IDD = Dialog_Talk };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
public:
static DWORD RecvProc(LPVOID x);
BOOL StartThread();
afx_msg void OnBnCloseOk();
afx_msg void OnBtnSend();
afx_msg void OnPaint();
afx_msg LRESULT TOWriteMSG(WPARAM wParam,LPARAM lParam);
DECLARE_MESSAGE_MAP()
public:
CButton *Btn_send;
CListBox *LST_talking;
CEdit *Edt_write;
CStatic *STT_Imageinfo;
CStatic *STt_friendname;
HANDLE m_hThread;
CString recvstr;
BOOL targ;
friendname setName;
};