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

📄 cwindowmanager.cpp

📁 墨香完整原代码 C++ 值得研究 可以编译
💻 CPP
字号:
// cWindowManager.cpp: implementation of the cWindowManager class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "cWindowManager.h"
#include "cScriptManager.h"
#include "GameResourceManager.h"
#include "../GlobalEventFunc.h"

#include "..\CharMake.h"
#include "..\MainDialog.h"
#include "..\GameIn.h"
#include "..\WindowIDEnum.h"
#include "..\ObjectManager.h"
#include "..\CharacterDialog.h"
#include "..\MugongManager.h"
#include "..\ItemManager.h"
#include "..\InventoryExDialog.h"
#include "..\MoneyDlg.h"
#include "cTabDialog.h"
#include "..\AlertDlg.h"
#include "cWindowFunc.h"
#include "../MousePointer.h"
#include "../input/cIMEWnd.h"
#include "../input/Mouse.h"
#include "cAnimationManager.h"
#include "../MiniMapDlg.h"
#include "../MHMap.h"
#include "../cMsgBox.h"
#include "../cDivideBox.h"
#include "cWindowSystemFunc.h"
#include "mhFile.h"
#include "SuryunDialog.h"

#include "../MugongSuryunDialog.h"
#include "MainBarDialog.h"
#include "MunpaListDialog.h"
#include "MunpaDialog.h"
#include "MunpaCreateDialog.h"
#include "GuildCreateDialog.h"
#include "GuildDialog.h"
#include "GuildInviteDialog.h"
#include "GuildMarkDialog.h"
#include "GuildLevelUpDialog.h"
#include "GuildNickNameDialog.h"
#include "GuildRankDialog.h"
#include "GuildWarehouseDialog.h"
#include "PyogukDialog.h"
#include "MacroDialog.h"
#include "ChatOptionDialog.h"
#include "ChatDialog.h"
#include "OptionDialog.h"
#include "CharStateDialog.h"
#include "MenuSlotDialog.h"

#include "NoteDialog.h"
#include "FriendDialog.h"
#include "MiniFriendDialog.h"
#include "MiniNoteDialog.h"
#include "ReviveDialog.h"
#include "ExchangeDialog.h"
#include "StreetStall.h"
#include "NpcScriptDialog.h"
#include "HelpDialog.h"
#include "DealDialog.h"
#include "QuickDialog.h"
#include "InventoryExDialog.h"
#include "UpgradeDlg.h"
#include "MixDialog.h"
#include "ReinforceDlg.h"
#include "DissloveDlg.h"
#include "WantNpcDialog.h"
#include "WantRegistDialog.h"
#include "QuestTotalDialog.h"
#include "QuestDialog.h"
#include "WantedDialog.h"
#include "JournalDialog.h"
#include "PartyCreateDlg.h"
#include "PartyInviteDlg.h"
#include "BailDialog.h"
#include "MPRegistDialog.h"
#include "MPMissionDialog.h"
#include "MPNoticeDialog.h"
#include "MPGuageDialog.h"

#include "DissolutionDialog.h"

#include "./Input/UserInput.h"
#include "MouseCursor.h"
#include "StatusIconDlg.h"

extern HWND _g_hWnd;

GLOBALTON(cWindowManager);

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

cWindowManager::cWindowManager()
{
	m_pScriptManager	= NULL;
	m_pWindowList		= NULL;
	m_pIconDlgListRef	= NULL;
	m_pEditBoxListRef	= NULL;
	m_pDestroyWindowRef = NULL;
	m_pScreenTextList	= NULL;
	m_OldDragFlag		= FALSE;
//	ID_SEED = 0;	//?
//	m_CommonDlgIDIndex.Init(MAX_COMMONDLGID_NUM, 500);			//start index 5000 tmp
	m_pMousePointWindow = NULL;
	m_pGuageWindow		= NULL;
	m_pMonsterGuageWindow = NULL;
	m_fComposition		= FALSE;
	cbDragnDropProcess	= NULL;
	
	m_pFocusedEdit		= NULL;
	
	m_id			= -1;
	m_pDragDialog	= NULL;
}

cWindowManager::~cWindowManager()
{
//	Release();	//PJH 咯扁辑 角青窍搁 滴锅 Release窍霸 等促
}
void cWindowManager::Release()
{
	DestroyWindowAll();
	SAFE_DELETE(m_pScriptManager);
	SAFE_DELETE(m_pIconDlgListRef);
	SAFE_DELETE(m_pEditBoxListRef);
	SAFE_DELETE(m_pScreenTextList);
	SAFE_DELETE(m_pPlayerChatTooltip);
	SAFE_DELETE(m_pWindowList);
	SAFE_DELETE(m_pDestroyWindowRef);
	SAFE_DELETE(m_pMousePointWindow);
	SAFE_DELETE(m_pGuageWindow);
	SAFE_DELETE(m_pMonsterGuageWindow);
	
	CFONT_OBJ->Release();
}

void cWindowManager::Init()
{
	m_pScriptManager = new cScriptManager;
	m_pWindowList = new cPtrList;
	m_pEditBoxListRef = new cPtrList;
	m_pIconDlgListRef = new cPtrList;
	m_pDestroyWindowRef = new cPtrList;
	m_pScreenTextList = new cPtrList;
	m_pPlayerChatTooltip = new cPtrList;

	LOGFONT	font;

//pjslocal
	
#ifdef TAIWAN_LOCAL
	font.lfHeight = -MulDiv(9, GetDeviceCaps(GetDC( _g_hWnd ), LOGPIXELSY), 72);
//	font.lfHeight = -12;
	font.lfWidth = -font.lfHeight / 2;
	font.lfEscapement = 0;
	font.lfOrientation = 0;
	font.lfWeight = FW_NORMAL;
	font.lfItalic = 0;
	font.lfUnderline = 0;
	font.lfStrikeOut = 0;
	font.lfCharSet = GB2312_CHARSET;	//埃眉
	font.lfOutPrecision = 0;
	font.lfClipPrecision = 0;
	font.lfQuality =  PROOF_QUALITY;//NONANTIALIASED_QUALITY;//PROOF_QUALITY;
	font.lfPitchAndFamily = 0;
//	lstrcpy(font.lfFaceName,"灿

⌨️ 快捷键说明

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