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

📄 editwndmgr.h

📁 网络游戏龙族 完整的登陆器 C++ 源代码
💻 H
字号:
// EditWndMgr.h: interface for the CEditWndMgr class.
// Make By Hwoarang Sangwoo 2002 10 01
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_EDITWNDMGR_H__CCD50119_39F2_4932_8DEF_B46CD7E4330A__INCLUDED_)
#define AFX_EDITWNDMGR_H__CCD50119_39F2_4932_8DEF_B46CD7E4330A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

enum//酒贰狼 enum 阑 函拳 窍瘤 臼档废 秦具 钦聪促. 林狼 窍技夸. 0锅篮 馆靛矫 HWND_NOW_FOCUS 咯具 钦聪促.
{
	HWND_NOW_FOCUS = 0,
	HWND_CHAT_INPUT = 1,
	HWND_CHAT_TARGET_INPUT = 2,
	HWND_1,//hwnd1
	HWND_2,//hwnd2
	HWND_3,//hwndEditBox ;  // 捞抚阑 困茄
	HWND_BBS, //hwnd_bbs
	HWND_MAIL1,
	HWND_MAIL2,
	HWND_MAIL3,
	HWND_GAME_MAIN,//霸烙 扩档快//亲惑 付瘤阜俊 困摹
};

typedef struct HWNDINFO
{
	int		iIndex;
	HWND	hWnd;
#ifdef STRICT
	WNDPROC	ProcAddress;
#else
	FARPROC	ProcAddress;
#endif
}t_HWndInfo,*lpHWNDINFO;

typedef vector<HWNDINFO>::iterator wndItor;

class CEditWndMgr  
{
public:
	CEditWndMgr();
	virtual ~CEditWndMgr();
private:
	CEditWndMgr(const CEditWndMgr &old);//扁夯栏肺 积己登绰 汗荤 积己磊甫 荤侩 且 荐 绝嚼聪促.
	CEditWndMgr operator= (const CEditWndMgr &old);//措涝 楷魂磊甫 荤侩 且 荐 绝嚼聪促.
private:	
	vector<HWNDINFO> vtWnd;//扩档快 沥焊 氦磐

public:
	int InitEditWnd();
	void ClearAllTxt();//涝仿等 郴侩阑 葛滴 瘤矿聪促.//""甫 持绰疤聪促.
	void ClearTxt(const int iIndex);//急琶茄 俊叼飘 冠胶狼 郴侩阑 瘤矿聪促.
	
	int	SetTxt(const int iIndex, const char* txt)//扩档快俊 咆胶飘甫 悸泼 钦聪促.
	{
		HWND tempHWnd = GetHWnd(iIndex);
		SetWindowText(tempHWnd,(txt)?txt:NULL);
		SendMessage( tempHWnd, WM_KEYDOWN, VK_END, 0 );
		return 1;
	}
	int	GetTxt(const int iIndex, char* txt, const int iSize)//扩档快狼 咆胶飘甫 啊廉可聪促.
	{
		return GetWindowText( GetHWnd(iIndex), txt, iSize );
	}

	HWND SetWndFocus(const int iIndex);//扩档快狼 器目胶甫 悸泼 钦聪促.
	HWND GetHWnd(const int iHWndIndex)
	{
		for(wndItor itor = vtWnd.begin() ;itor != vtWnd.end();itor++)
		{
			if(  iHWndIndex == (*itor).iIndex)
			{
				return (*itor).hWnd;
			}
		}
		return 0;
	}

#ifdef STRICT
	WNDPROC	GetProcAddress(const int iHWndIndex)
#else
	FARPROC	GetProcAddress(const int iHWndIndex)
#endif
	{
		for(wndItor itor = vtWnd.begin() ;itor != vtWnd.end();itor++)
		{
			if(  iHWndIndex == (*itor).iIndex)
			{
				return (*itor).ProcAddress;
			}
		}
		return 0;
	}

	int IsFocus(const int iIndex){return (iIndex == GetFocusWndIndex())?1:0;}
	int CheckSysKey( UINT uiMessage, WPARAM wParam );//alt + F4 幅狼 矫胶袍 皋技瘤 眉农

	int GetFocusWndIndex()//HWND_NOW_FOCUS 狼 牢郸胶甫 馆券 窍瘤 臼绰促
	{
		HWND HWndFocus = GetHWnd(HWND_NOW_FOCUS);
		for(wndItor itor = vtWnd.begin() ;itor != vtWnd.end();itor++)
		{
			if(HWndFocus == (*itor).hWnd &&  HWND_NOW_FOCUS !=(*itor).iIndex)//扩档快绰 老摹窍登 牢郸胶啊 器目胶捞搁 救等促
			{
				return (*itor).iIndex;
			}
		}
		return 0;
	}
private:
	void Clear();
	void DestroyEditWnd();
	friend LRESULT CALLBACK CommonEditWndProc( HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lParam );//焊烹狼 扩档快 橇肺矫历
	friend LRESULT CALLBACK ChatWndProc( HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lParam );//盲泼 措拳 惑措 瘤沥 扩档快 橇肺矫历
	friend LRESULT CALLBACK ChatTargetWndProc( HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lParam );//盲泼 郴侩 涝仿芒狼 扩档快 橇肺矫历
	friend LRESULT CALLBACK MailWndProc1( HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lParam );//皋老1 俊辑 静绰 扩档快 橇肺矫历
	friend LRESULT CALLBACK MailWndProc2( HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lParam );//皋老2 俊辑 静绰 扩档快 橇肺矫历
	friend LRESULT CALLBACK MailWndProc3( HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lParam );//皋老3 俊辑 静绰 扩档快 橇肺矫历
};
extern CEditWndMgr EWndMgr;
#endif // !defined(AFX_EDITWNDMGR_H__CCD50119_39F2_4932_8DEF_B46CD7E4330A__INCLUDED_)

⌨️ 快捷键说明

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