Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
115 lines
3.4 KiB
C++
115 lines
3.4 KiB
C++
// QuickMenuDlgBar.cpp : 구현 파일입니다.
|
|
//
|
|
#include "stdafx.h"
|
|
#include "MainFrm.h"
|
|
#include "AdminToolClient.h"
|
|
#include "QuickMenuDlgBar.h"
|
|
#include "WindowMgr.h"
|
|
#include "GlobalFunctions.h"
|
|
|
|
|
|
IMPLEMENT_DYNAMIC(CQuickMenuDlgBar, CInitDialogBar)
|
|
CQuickMenuDlgBar::CQuickMenuDlgBar()
|
|
{
|
|
INSERT_WINDOW(IDD_QUICKMENUDLGBAR, static_cast<CWnd*>(this));
|
|
}
|
|
|
|
CQuickMenuDlgBar::~CQuickMenuDlgBar()
|
|
{
|
|
ERASE_WINDOW(IDD_QUICKMENUDLGBAR);
|
|
}
|
|
|
|
void CQuickMenuDlgBar::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CInitDialogBar::DoDataExchange(pDX);
|
|
|
|
DDX_Control(pDX, IDC_CHARSEARCHCOMBO1, m_ctrlCharSearchCombo1);
|
|
DDX_Control(pDX, IDC_CHARSEARCHCOMBO2, m_ctrlCharSearchCombo2);
|
|
DDX_Control(pDX, IDC_CHARSEARCH, m_ctrlSearchBtn);
|
|
DDX_Control(pDX, IDC_CONNECTEDSERVER_LIST, m_ctrlConnectedServerList);
|
|
DDX_Control(pDX, IDC_CONNECTEDUSER_LIST, m_ctrlInterestedUserList);
|
|
}
|
|
|
|
BEGIN_MESSAGE_MAP(CQuickMenuDlgBar, CInitDialogBar)
|
|
ON_CBN_SELCHANGE(IDC_CHARSEARCHCOMBO1, OnCbnSelchangeCharsearchcombo1)
|
|
ON_MESSAGE(WM_INITDIALOG, InitDialog)
|
|
END_MESSAGE_MAP()
|
|
|
|
// CQuickMenuDlgBar 메시지 처리기입니다.
|
|
|
|
LRESULT CQuickMenuDlgBar::InitDialog(WPARAM, LPARAM)
|
|
{
|
|
UpdateData(FALSE);
|
|
OnInitDialog();
|
|
|
|
return 0L;
|
|
}
|
|
|
|
BOOL CQuickMenuDlgBar::OnInitDialog()
|
|
{
|
|
SetUIString(this->m_hWnd, IDC_RIGHTBAR_01, "IDC_RIGHTBAR_01");
|
|
SetUIString(this->m_hWnd, IDC_RIGHTBAR_02, "IDC_RIGHTBAR_02");
|
|
SetUIString(this->m_hWnd, IDC_RIGHTBAR_03, "IDC_RIGHTBAR_03");
|
|
SetUIString(this->m_hWnd, IDC_CHARSEARCH, "IDC_CHARSEARCH");
|
|
SetUIString(this->m_hWnd, IDC_CONNECTIONCHK_BTN, "IDC_CONNECTIONCHK_BTN");
|
|
SetUIString(this->m_hWnd, IDC_CONNECTALLSERVERZ_BTN, "IDC_CONNECTALLSERVERZ_BTN");
|
|
SetUIString(this->m_hWnd, IDC_DISABLEBOX_CHECK, "IDC_DISABLEBOX_CHECK");
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
void CQuickMenuDlgBar::OnCbnSelchangeCharsearchcombo1()
|
|
{
|
|
GetDlgItem(IDC_CHARSEARCHCOMBO2)->EnableWindow(
|
|
(m_ctrlCharSearchCombo1.GetCurSel() == CMainFrame::SEARCH_CHARACTER)
|
|
|| (m_ctrlCharSearchCombo1.GetCurSel() == CMainFrame::SEARCH_CID));
|
|
|
|
if (UnifiedConst::Part2Selectable == theApp.GetAgentType())
|
|
{
|
|
GetDlgItem(IDC_OLD_SERVERID_EDIT)->EnableWindow(
|
|
(m_ctrlCharSearchCombo1.GetCurSel() == CMainFrame::SEARCH_UID)
|
|
|| (m_ctrlCharSearchCombo1.GetCurSel() == CMainFrame::SEARCH_ACCOUNT));
|
|
}
|
|
|
|
}
|
|
|
|
bool CQuickMenuDlgBar::InterestedUserListSet(PktBase* lpPktBase)
|
|
{
|
|
CButton* lpChk = static_cast<CButton*>(GetDlgItem(IDC_DISABLEBOX_CHECK));
|
|
|
|
CString strMessage;
|
|
strMessage.Format("%s", GetLocalString("MSG_0179"));
|
|
|
|
bool bIsNewLogin = false;
|
|
|
|
char* szAccount = reinterpret_cast<char*>(lpPktBase + 1);
|
|
char* szAccount2 = reinterpret_cast<char*>(lpPktBase + 1);
|
|
char* szAccountEnd = szAccount + lpPktBase->GetLen() - sizeof(PktBase);
|
|
|
|
// 새로 접속한 계정이 있는지 찾아서 스트링에 저장
|
|
for(; szAccount < szAccountEnd; szAccount += PktAdminMgr::MAX_ACCOUNT)
|
|
{
|
|
if (LB_ERR == m_ctrlInterestedUserList.FindString(-1, szAccount))
|
|
{
|
|
strMessage.AppendFormat("\r\n%s", szAccount);
|
|
bIsNewLogin = true;
|
|
}
|
|
}
|
|
|
|
// 목록을 새로 받은 정보로 갱신
|
|
m_ctrlInterestedUserList.ResetContent();
|
|
for(; szAccount2 < szAccountEnd; szAccount2 += PktAdminMgr::MAX_ACCOUNT)
|
|
{
|
|
m_ctrlInterestedUserList.AddString(szAccount2);
|
|
}
|
|
|
|
// 알림메시지 사용으로 체크되어있고 새로 접속한 계정이 있을 경우 창으로 알림
|
|
if ((BST_CHECKED != lpChk->GetCheck()) && (true == bIsNewLogin))
|
|
{
|
|
// 이 메세지 박스 때문에 디스패치 처리를 못하는 경우가 있음.
|
|
MessageBox(strMessage);
|
|
|
|
}
|
|
|
|
return true;
|
|
} |