style: Format source code and support grouping client

This commit is contained in:
yuanyuanxiang
2025-10-15 04:32:59 +08:00
parent 77087d2e06
commit 6b81ad1f81
244 changed files with 43052 additions and 42562 deletions

View File

@@ -8,39 +8,40 @@
class CGridDialog : public CDialog
{
public:
CGridDialog();
CGridDialog();
BOOL AddChild(CDialog* pDlg); // <20><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD><EFBFBD>ӶԻ<D3B6><D4BB><EFBFBD>
void RemoveChild(CDialog* pDlg); // <20><>̬<EFBFBD>Ƴ<EFBFBD><C6B3>ӶԻ<D3B6><D4BB><EFBFBD>
void SetGrid(int rows, int cols); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void LayoutChildren(); // <20><><EFBFBD><EFBFBD>
BOOL HasSlot() const {
return m_children.size() < m_max;
}
BOOL AddChild(CDialog* pDlg); // <20><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD><EFBFBD>ӶԻ<D3B6><D4BB><EFBFBD>
void RemoveChild(CDialog* pDlg); // <20><>̬<EFBFBD>Ƴ<EFBFBD><C6B3>ӶԻ<D3B6><D4BB><EFBFBD>
void SetGrid(int rows, int cols); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void LayoutChildren(); // <20><><EFBFBD><EFBFBD>
BOOL HasSlot() const
{
return m_children.size() < m_max;
}
protected:
virtual BOOL OnInitDialog();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
virtual BOOL PreTranslateMessage(MSG* pMsg);
afx_msg LRESULT OnChildClosed(WPARAM wParam, LPARAM lParam);
virtual BOOL OnInitDialog();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
virtual BOOL PreTranslateMessage(MSG* pMsg);
afx_msg LRESULT OnChildClosed(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
DECLARE_MESSAGE_MAP()
private:
HICON m_hIcon;
int m_rows = 0;
int m_cols = 0;
int m_max = 0;
std::vector<CDialog*> m_children;
HICON m_hIcon;
int m_rows = 0;
int m_cols = 0;
int m_max = 0;
std::vector<CDialog*> m_children;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
CDialog* m_pMaxChild = nullptr; // <20><>ǰ<EFBFBD><C7B0><EFBFBD>󻯵<EFBFBD><F3BBAFB5>ӶԻ<D3B6><D4BB><EFBFBD>
LONG m_parentStyle = 0; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԭʼ<D4AD><CABC>ʽ
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
CDialog* m_pMaxChild = nullptr; // <20><>ǰ<EFBFBD><C7B0><EFBFBD>󻯵<EFBFBD><F3BBAFB5>ӶԻ<D3B6><D4BB><EFBFBD>
LONG m_parentStyle = 0; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԭʼ<D4AD><CABC>ʽ
struct ChildState {
CRect rect; // ԭʼλ<CABC><CEBB>
LONG style; // ԭʼ<D4AD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
};
std::map<CDialog*, ChildState> m_origState;
struct ChildState {
CRect rect; // ԭʼλ<CABC><CEBB>
LONG style; // ԭʼ<D4AD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
};
std::map<CDialog*, ChildState> m_origState;
};