Improve: Reduce master program redundant code

This commit is contained in:
yuanyuanxiang
2025-06-28 23:52:26 +08:00
parent 44f28defa2
commit c59232d179
39 changed files with 361 additions and 872 deletions

View File

@@ -147,7 +147,18 @@ public:
void SortByColumn(int nColumn);
afx_msg VOID OnHdnItemclickList(NMHDR* pNMHDR, LRESULT* pResult);
static int CALLBACK CompareFunction(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
template<class T, int id, int Show=SW_SHOW> LRESULT OpenDialog(WPARAM wParam, LPARAM lParam)
{
CONTEXT_OBJECT* ContextObject = (CONTEXT_OBJECT*)lParam;
T* Dlg = new T(this, m_iocpServer, ContextObject);
Dlg->Create(id, GetDesktopWindow());
Dlg->ShowWindow(Show);
ContextObject->v1 = id;
ContextObject->hDlg = Dlg;
return 0;
}
VOID InitControl(); //<2F><>ʼ<EFBFBD>ؼ<EFBFBD>
VOID TestOnline(); //<2F><><EFBFBD>Ժ<EFBFBD><D4BA><EFBFBD>
VOID AddList(CString strIP, CString strAddr, CString strPCName, CString strOS, CString strCPU, CString strVideo, CString strPing,