⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 conversation.h

📁 vc++6.0开发网络典型应用实例导航 1. 本光盘提供了本书中所有的实例源程序文件。 2. 附录文件夹下是Winsock 函数参考以及错误码列表
💻 H
字号:
#if !defined(AFX_CONVERSATION_H__AE694505_0FCE_4EC3_B10E_7E34B877AB77__INCLUDED_)
#define AFX_CONVERSATION_H__AE694505_0FCE_4EC3_B10E_7E34B877AB77__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Conversation.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CConversation dialog

#include "ConvEdit.h"
#include "ColorStatic.h"
#include "StaticSplitter.h"
#include "TrackLookButton.h"
#include "MSNButton.h"
#include "FileSend.h"
#include "ProgressCtrlX.h"
#include "BackgroundWnd.h"

class CContact;
class CConversationThread;
class CConversation;


struct MESSAGE
{
	CConversation *CallingDialog;
	CContact *To;
	char Message[1024];
};

class CConversation : public CDialog
{
// Construction
public:
	CConversation(CWnd* pParent = NULL, CContact *With = NULL, char *DefaultMsg = NULL);   // standard constructor
	~CConversation();
// Dialog Data
	//{{AFX_DATA(CConversation)
	enum { IDD = IDD_CONVERSATION_DIALOG };
	CTrackLookButton	m_Cancel;
	CTrackLookButton	m_SendFile;
	CTrackLookButton	m_Block;
	CConvEdit	m_SendMsg;
	CConvEdit	m_Chat;
	//}}AFX_DATA

	bool HasMessage;
	bool IsTransfering;
	bool Enabled;

	CBackgroundWnd m_bgWnd;

	CStaticSplitter m_Splitter;

	CColorStatic m_To;
	CColorStatic m_Message;

	char *pszDefaultMessage;
	char Host[256];

	LRESULT ReceivedMessage(WPARAM wParam, LPARAM lParam);
	LRESULT OnTypeNotify(WPARAM wParam, LPARAM lParam);

	CContact *Contact;
	CStatusBar m_statusBar;

	CFont Font;
	CFont FontNormal;
	CFont FontBold;

	CBrush BrushWhite;
	CBrush BrushNormal;
	CBrush BrushLight;
	CBrush BrushDisabled;

	CMSNButton m_SendButton;

	void HostResolved(const char *);
	void OnSend();
	void ShowMessage(const char *);
	void HideMessage();
	void Enable();
	void Disable();
	void SetBlocked(bool);
	void SetNoSend(bool);
	void UpdateWindow();
	void FileDropped(char *, unsigned int);
	void ScreenNameChanged(const char *);
	void SplitterMoved(int);
	void UpdateSizes();
	void RedrawEssential();
	void PrepareHtmlHelp();

	USERFONT ufFontNormal;

	// file transfer members //

	BOOL InitStatus(CFileSocketThread *, CContact *, bool, char *);
	void SetStats(unsigned long, unsigned long);
	void SetPercent(int);
	void SetStatus(const char *);
	void Remove();
	void Ended();
	void SetSplitterPos(int);
	void ColorUpdate();
	
	int m_SplitterPos;

	char FileName[1024];

	bool Sending;

	CFileSocketThread *Thread;

	CColorStatic m_TransferStats;
	CColorStatic m_FileStats;
	CColorStatic m_Rate;

	CProgressCtrlX m_Progress;

	HICON m_iSendFile;
	HICON m_iSendFileD;
	HICON m_iBlock;
	HICON m_iUnblock;

	HICON m_hIcon;

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CConversation)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CConversation)
	afx_msg void OnSize(UINT nType, int cx, int cy);
	virtual BOOL OnInitDialog();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnChangeSendmsg();
	afx_msg void OnIdrconversationmenuBlock();
	afx_msg void OnIdrconversationmenuSendfile();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg void OnIdrconversationmenuChangefont();
	afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
	afx_msg void OnClose();
	afx_msg void OnPaint();
	afx_msg void OnFileClose();
	afx_msg void OnBlock();
	afx_msg void OnSendfile();
	afx_msg void OnTransferCancel();
	virtual void OnOK();
	virtual void OnCancel();
	afx_msg void OnActionsChooseadvancedcolor();
	afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
	afx_msg void OnHelpEmoticonshelp();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CONVERSATION_H__AE694505_0FCE_4EC3_B10E_7E34B877AB77__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -