LAPTOP-T815PCOQ\25526
2024-12-18 b8a705515cd307bd46e04eeccc0bf0e158133402
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once
 
class CBaseDlg : public CDialogEx
{
    DECLARE_DYNAMIC(CBaseDlg)
 
public:
    CBaseDlg(UINT id, CWnd* pPage);                // ±ê×¼¹¹Ô캯Êý
    virtual ~CBaseDlg();                        // Îö¹¹º¯Êý
 
    CFont* GetOrCreateFont(int nFontSize);        // »ñÈ¡»ò´´½¨×ÖÌå
    void SetDefaultFont();                        // ÉèÖÃĬÈÏ×ÖÌå
 
private:
    void AdjustControls(float dScaleX, float dScaleY);                // µ÷Õû¿Ø¼þ´óС
    void AdjustControlFont(CWnd* pWnd, int nWidth, int nHeight);    // µ÷Õû¿Ø¼þ×ÖÌå
 
private:
    int m_nInitialWidth;                        // ¶Ô»°¿ò³õʼ¿í¶È
    int m_nInitialHeight;                        // ¶Ô»°¿ò³õʼ¸ß¶È    
    std::map<int, CFont*> m_mapFonts;            // ¿Ø¼þ×ÖÌå
    std::map<int, CRect> m_mapCtrlLayouts;        // ¿Ø¼þ²¼¾Ö
 
    DECLARE_MESSAGE_MAP()
public:
    virtual BOOL OnInitDialog();
    afx_msg void OnSize(UINT nType, int cx, int cy);
    afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
};