Restructure repository to include all source folders
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>
This commit is contained in:
126
Server/ToolProject/GameDBTool/PartyList.cpp
Normal file
126
Server/ToolProject/GameDBTool/PartyList.cpp
Normal file
@@ -0,0 +1,126 @@
|
||||
// PartyList.cpp : 구현 파일입니다.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "GameDBTool.h"
|
||||
#include "PartyList.h"
|
||||
|
||||
// CPartyList
|
||||
char g_PartyField[2][20] = { "아이디", "이름" };
|
||||
|
||||
IMPLEMENT_DYNAMIC(CPartyList, CListCtrl)
|
||||
CPartyList::CPartyList()
|
||||
{
|
||||
}
|
||||
|
||||
CPartyList::~CPartyList()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CPartyList, CListCtrl)
|
||||
//{{AFX_MSG_MAP(CUserList)
|
||||
ON_NOTIFY_REFLECT(NM_CUSTOMDRAW, OnCustomDraw)
|
||||
ON_WM_LBUTTONDBLCLK()
|
||||
ON_WM_HSCROLL()
|
||||
ON_WM_VSCROLL()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
// CPartyList 메시지 처리기입니다.
|
||||
void CPartyList::OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult)
|
||||
{
|
||||
CListViewControl::OnCustomDraw(pNMHDR, pResult);
|
||||
}
|
||||
|
||||
void CPartyList::OnLButtonDblClk(UINT nFlags, CPoint point)
|
||||
{
|
||||
CListViewControl::OnLButtonDblClk(nFlags, point);
|
||||
}
|
||||
|
||||
void CPartyList::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
|
||||
{
|
||||
// TODO: Add your message handler code here and/or call default
|
||||
|
||||
CListViewControl::OnHScroll(nSBCode, nPos, pScrollBar);
|
||||
}
|
||||
|
||||
void CPartyList::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
|
||||
{
|
||||
// TODO: Add your message handler code here and/or call default
|
||||
|
||||
CListViewControl::OnVScroll(nSBCode, nPos, pScrollBar);
|
||||
}
|
||||
|
||||
//Interface////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// SetColumn [ public ]
|
||||
// - 테이블 컬럼 세팅
|
||||
//
|
||||
// Parameter :
|
||||
// 1st : 컬럼 정보
|
||||
//
|
||||
// Return:
|
||||
// 성공시 true
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
bool CPartyList::SetColumn(void)
|
||||
{
|
||||
DWORD ExStyle = LVS_EX_FLATSB | LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES;
|
||||
SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, ExStyle);
|
||||
|
||||
DWORD Style = GetWindowLong(m_hWnd, GWL_STYLE);
|
||||
Style |= LVS_EDITLABELS;
|
||||
|
||||
if (!SetWindowLong(m_hWnd, GWL_STYLE, Style))
|
||||
return false;
|
||||
|
||||
CStringList StringList;
|
||||
int IndexCounter = 0;
|
||||
|
||||
SetColumnType(0, CT_EDIT);
|
||||
InsertColumn(0, g_PartyField[0], LVCFMT_LEFT, 4 * 20 + 10);
|
||||
|
||||
SetColumnType(1, CT_EDIT);
|
||||
InsertColumn(1, g_PartyField[1], LVCFMT_LEFT, 8 * 20 + 10);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CPartyList::AddPartyRows(LPPARTY_INFO PartyInfo_In)
|
||||
{
|
||||
CString strItem;
|
||||
int Index;
|
||||
|
||||
DeleteAllItems();
|
||||
for(Index = 0; Index < PartyInfo_In->MAX_MEM; Index++)
|
||||
{
|
||||
strItem.Format("%d", PartyInfo_In->MemberCID[Index]);
|
||||
InsertItem(Index, strItem);
|
||||
SetItemText(Index, 1, PartyInfo_In->Name[Index]);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CPartyList::GetPartyRows(LPPARTY_INFO PartyInfo_Out)
|
||||
{
|
||||
char strItemText[256];
|
||||
int Counter = 0;
|
||||
int Index;
|
||||
|
||||
int MemNum = GetItemCount();
|
||||
|
||||
ZeroMemory(PartyInfo_Out, sizeof(PARTY_INFO));
|
||||
|
||||
for(Index = 0; Index < MemNum; Index++)
|
||||
{
|
||||
GetItemText(Index, 0, strItemText, 256);
|
||||
PartyInfo_Out->MemberCID[Index] = atoi(strItemText);
|
||||
|
||||
GetItemText(Index, 1, strItemText, 256);
|
||||
strcpy(PartyInfo_Out->Name[Index], strItemText);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user