U E D R , A S I H C RSS

MFC/Message Map

1. MessageMap

이벀트의 λ°œμƒκ³Ό ν•¨κ»˜ μ „λ‹¬λ˜λŠ” λ©”μ‹œμ§€λΌ μ²˜λ¦¬ν•˜λŠ” λ©”μ‹œμ§€ 맡에 λŒ€ν•œ μ„λͺ…이닀. ν•˜λ‹¨μ˜ μ†ŒμŠ€λŠ” AppWizardκ°€ 기본적으둜 μƒμ„±ν•œ μ½”λ“œμ—μ„œ λ°œμ·Œν•œ 것이닀.

자료) μžλ£Œμ‹€

2. μ‚¬μš©μž μ •μ˜ λ©”μ‹œμ§€ λ°œμƒμ‹œν‚€κΈ°

  • μ‚¬μš©μž μ •μ˜ λ©”μ‹œμ§€λž€ : νŠΉμ •ν•œ μ‹œμ μ—μ„œ λ©”μ‹œμ§€λΌ λ³΄λ‚΄μ„œ λ‹€λ₯Έ 객체의 ν•¨μˆ˜λΌ μ‹€ν–‰ μ‹œν‚¬μˆ˜ μžˆλ‹€. ꡉμž₯히 μœ μš©ν•˜λ‹€. μΌμ’…μ˜ 콜백 ν•¨μˆ˜ 역할을 μˆ˜ν–‰ν•  수 μžˆλŠ”κ²ƒμ΄λ‹€. 즉 μ–΄λ– ν•œ λ‹€λ₯Έ ν΄λž˜μŠ€μ—μ„œ νŠΉμ • μ‹œμ μ—μ„œ λ‹€λ₯Έ 객체의 νŠΉμ • ν•¨μˆ˜λΌ μ‹€ν–‰μ‹œμΌœμ•Ό ν•  ν•„μš”κ°€ μžˆμ„λ•Œ μ‚¬μš©ν•˜λ©΄ μœ μš©ν•˜κ³ , μ†ŒμΌ“ ν”„λ‘œκ·Έλž˜λ°μ—μ„œ 자주 μ‚¬μš©λœλ‹€.
    • μ‚¬μš© 예 : μ–΄λ–€ ν΄λž˜μŠ€κ°€ view 클래슀의 멀버 λ³€μˆ˜μ΄λ‹€. ν•΄λ‹Ή ν΄λž˜μŠ€λŠ” νŒŒμΌμ„ λ‹€μš΄λ‘œλ“œ λ°›λŠ” 클래슀인데 ν•΄λ‹Ή ν΄λž˜μŠ€μ—μ„œ λ‹€μš΄λ‘œλ“œκ°€ 끝났을 경우 view에 μžˆλŠ” serialize ν•¨μˆ˜λΌ μ‹€ν–‰ν•΄μ•Ό ν•œλ‹€. ν—ˆλ‚˜ ν˜„μž¬ viewν΄λž˜μŠ€κ°€ κ·Έ ν•΄λ‹Ή ν΄λž˜μŠ€λΌ λ©€λ²„λ‘œ 가지고 μžˆκΈ°μ— include 둜 ν•΄λ‹Ή ν΄λž˜μŠ€μ—μ„œ view ν΄λž˜μŠ€λΌ ν¬ν•¨ν•  μˆ˜λ„ μ—†κ³ , 또 view 클래슀의 ν˜„μž¬ μ‹€ν–‰λ˜λŠ” κ°μ²΄λΌ μ–»μ„ 방법도 λ§ˆλ•…νžˆ μ—†λ‹€. μ΄λ•Œ ν•΄λ‹Ή ν΄λž˜μŠ€μ—μ„œ λ‹€μš΄λ‘œλ“œκ°€ λλ‚œ μ‹œμ μ—μ„œ λ‹€μš΄λ‘œλ“œκ°€ λλ‚¬λ‹€λŠ” λ©”μ‹œμ§€λΌ λ°œμƒμ‹œμΌœμ„œ view에 μžˆλŠ” serialize ν•¨μˆ˜λΌ μ‹€ν–‰μ‹œν‚¬ 수 μžˆλ‹€. 이게 λ°”λ‘œ μ‚¬μš©μž μ •μ˜ λ©”μ‹œμ§€ λ°œμƒμ„ μ΄μš©ν•œ 사λ€..

~cpp
.h // 헀더 파일
#define UM_ACCEPTCLIENT (WM_USER+10) // μ‚¬μš©μž μ •μ˜ λ©”μ‹œμ§€λΌ μ •μ˜ ν•œλ‹€.
	//}}AFX_MSG
	afx_msg LRESULT OnAcceptClient(WPARAM wParam, LPARAM lParam); // 이뢀뢄에 μ΄λ ‡κ²Œ μ •μ˜ν•œ λ©”μ‹œμ§€λΌ μ‹€ν–‰ν•  ν•¨μˆ˜λΌ λ„£μ–΄μ€λ‹€. ν•¨μˆ˜λͺ…은 ν•˜κ³  μ‹Άμ€λ°λ‘œ..
	DECLARE_MESSAGE_MAP()

.cpp //κ΅¬ν˜„ 파일
begin Message map
ON_MESSAGE(UM_ACCEPTCLIENT, OnAcceptClient) // μ΄λΆ€λΆ„μ—μ„œ  UM_ACCEPTCLIENTκ°€ λ°œμƒν•˜λ©΄ OnAcceptClientν•¨μˆ˜λΌ μ‹€ν–‰μ‹œν‚¨λ‹€κ³  λ§΅ν•‘ν•œλ‹€.
end messagemap

afx_msg LRESULT OnAcceptClient(WPARAM wParam, LPARAM lParam)
{
κ΅¬ν˜„
}	

μ‚¬μš©
m_pWnd->SendMessage(UM_ACCEPTCLIENT);	

3. Code Part

in application_name.h
~cpp 
class CEx14App : public CWinApp
{
public:
	CEx14App();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CEx14App)
	public:
	virtual BOOL InitInstance();
	//}}AFX_VIRTUAL

	// λ©”μ‹œμ§€ 맡이 μ •μ˜λœ 뢀뢄이닀.
// Implementation
	//{{AFX_MSG(CEx14App)
	afx_msg void OnAppAbout();		// μœ„μ €λ“œλ‘œ μƒμ„±λ˜λŠ” κΈ°λ³Έ μ½”λ“œμ—μ„œλŠ” μ˜€λ‘œμ§€ ID_APP_ABOUT λ§€μ‹œμ§€ λ§Œμ„ μ²˜λ¦¬ν•˜λŠ” ν•¨μˆ˜κ°€ μ‘΄μž¬ν•œλ‹€.
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()		// λ©”μ‹œμ§€ 맡이 μ •μ˜λœ ν΄λž˜μŠ€μ—λŠ” λ°˜λ“œμ‹œ 이 맀크둜 ν•¨μˆ˜κ°€ ν¬ν•¨λ˜μ–΄μ•Ό ν•œλ‹€.
								// μˆ˜λ™μœΌλ‘œ λ§€μ‹œμ§€ 맡을 μΆ”κ°€ν•˜λ €κ³  ν•œλ‹€λ©΄ λ°˜λ“œμ‹œ 이 뢀뢄을 μΆ”κ°€ν•΄μ•Όν•œλ‹€.
};
λ§€μ‹œμ§€λΌ μ²˜λ¦¬ν•  수 μžˆλŠ” ν΄λž˜μŠ€λŠ” MFC의 계측ꡬ쑰상 CCmdTarget ν΄λž˜μŠ€λΌ μƒμ†λ°›μ€ 클래슀라면 μ–΄λ””μ„œλ“  κ°€λŠ₯ν•˜λ‹€.
in application_name.cpp
~cpp 
BEGIN_MESSAGE_MAP(CEx14App, CWinApp)
	//{{AFX_MSG_MAP(CEx14App)
	ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
	// Standard file based document commands
	ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
	ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
	// Standard print setup command
	ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
클래슀의 μ •μ˜ 뢀뢄에 DECLARE_MESSAGE_MAP()을 ν¬ν•¨ν–ˆλ‹€λ©΄ κ·Έ 클래슀의 κ΅¬ν˜„ λΆ€λΆ„μ—λŠ” λ°˜λ“œμ‹œ BEGIN_MESSAGE_MAP(), END_MESSAGE_MAP()λ§€ν¬λ‘œκ°€ λ°˜λ“œμ‹œ μΆ”κ°€λ˜μ–΄μ•Ό ν•œλ‹€. 이 λΆ€λΆ„μ—μ„œλŠ” WM_COMMAND ν˜•νƒœλΌ κ°–λŠ” λ©”μ‹œμ§€ λ§Œμ„ μ²˜λ¦¬ν•˜κ³  μžˆλ‹€.
ON_COMMAND() 맀크둜 ν•¨μˆ˜λŠ” μ§€μ •λœ λ©”μ‹œμ§€ μ‹λ³„μž(ID_..)와 νŠΉμ • ν•¨μˆ˜λΌ λ¬Άμ–΄μ£ΌλŠ” 역할을 ν•œλ‹€.
in CAboutDlg implementation
~cpp 
class CAboutDlg : public CDialog
{
public:
	CAboutDlg();

// Dialog Data
	//{{AFX_DATA(CAboutDlg)
	enum { IDD = IDD_ABOUTBOX };
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAboutDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	//{{AFX_MSG(CAboutDlg)
		// No message handlers
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
	//{{AFX_DATA_INIT(CAboutDlg)
	//}}AFX_DATA_INIT
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAboutDlg)
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
	//{{AFX_MSG_MAP(CAboutDlg)
		// No message handlers
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

// App command to run the dialog
void CEx14App::OnAppAbout()
{
	CAboutDlg aboutDlg;
	aboutDlg.DoModal();
}
μž‘κ²ŒλŠ” CAboutDlg 도 μƒκΈ°μ˜ 쑰건에 λ§žμΆ”μ–΄μ Έμ„œ μ •μ˜λ˜μ–΄ μžˆμŒμ„ μ•Œ 수 μžˆλ‹€.

4. λ©”μ‹œμ§€μ˜ μ’…λ₯˜

window message WM_PAINT, WM_LBUTTONUPκ³Ό 같은 ν‘œμ€ μœˆλ„μš° λ©”μ‹œμ§€.
control notification message 컨트둀 폼과 같은 κ²ƒμœΌλ‘œ λΆ€ν„° λΆ€λͺ¨ μœˆλ„μš°μ—κ²Œ μ „λ‹¬λ˜λŠ” WM_COMMANDλ©”μ‹œμ§€μ΄λ‹€.
command message 메뉴, νˆ΄λ°”μ™€ 같은 UIμš”μ†Œμ—μ„œ μ˜€λŠ” WM_COMMAND λ©”μ‹œμ§€

5. λ©”μ‹œμ§€μ˜ 처리 μˆœμ„œ

MFCμ—μ„œλŠ” 기본적으둜 λ©”μ‹œμ§€κ°€ μ „λ‹¬λ˜λŠ” νŠΉμ • μˆœμ„œμ— λ”°λΌμ„œ λ©”μ‹œμ§€κ°€ 처리되고 처리 μ½”λ“œκ°€ 업을 결우 λ‹€μŒ μˆœμ„œμ˜ ν΄λž˜μŠ€μ—μ„œ κ·Έ λ©”μ‹œμ§€λΌ μ²˜λ¦¬ν•œλ‹€. κ²°κ΅­ κ·Έ λ©”μ‹œμ§€λΌ μ²˜λ¦¬ν•˜λŠ” μ½”λ“œκ°€ μ—†λ‹€λ©΄ λ©”μ‹œμ§€λŠ” μœˆλ„μš°λ‘œ λ„˜κ²¨μ§€κ³  νκΈ°μ²˜λ¦¬λœλ‹€.
λ¬Όλ‘  λ©”μ‹œμ§€μ˜ 전달 μˆœμ„œλΌ λ³€κ²½ν•˜λŠ” 것도 κ°€λŠ₯ν•˜λ‹€.

5.1. SDI Application

  • view object(menu object)
  • document object
  • document template object
  • main frame window object
  • application object

5.2. MDI Application

  • view object (activated)
  • document object (linked with view activated)
  • document template object (linked with document activated)
  • frame windows object (linked with view activate)
  • application object

  • 6. Message Identifier Symbol

    WM_COMMAND이외에도 μœˆλ„μš°μ—λŠ” λ‹€μ–‘ν•œ 식별 심볼듀이 μžˆλ‹€. μ΄λŠ” λ‹€μŒκ³Ό κ°™λ‹€.
    κ·Έλƒ₯ 참고둜 이런 파일이 μžˆλ‹€λŠ” μ‚¬μ‹€μ •λ„λŠ” μ•Œμ•„λ‘μž.
    in winuser.h
    ~cpp 
    /*
     * Window Messages
     */
    
    #define WM_NULL                         0x0000
    #define WM_CREATE                       0x0001
    #define WM_DESTROY                      0x0002
    #define WM_MOVE                         0x0003
    #define WM_SIZE                         0x0005
    
    #define WM_ACTIVATE                     0x0006
    /*
     * WM_ACTIVATE state values
     */
    #define     WA_INACTIVE     0
    #define     WA_ACTIVE       1
    #define     WA_CLICKACTIVE  2
    
    #define WM_SETFOCUS                     0x0007
    #define WM_KILLFOCUS                    0x0008
    #define WM_ENABLE                       0x000A
    #define WM_SETREDRAW                    0x000B
    #define WM_SETTEXT                      0x000C
    #define WM_GETTEXT                      0x000D
    #define WM_GETTEXTLENGTH                0x000E
    #define WM_PAINT                        0x000F
    #define WM_CLOSE                        0x0010
    #define WM_QUERYENDSESSION              0x0011
    #define WM_QUIT                         0x0012
    #define WM_QUERYOPEN                    0x0013
    #define WM_ERASEBKGND                   0x0014
    #define WM_SYSCOLORCHANGE               0x0015
    #define WM_ENDSESSION                   0x0016
    #define WM_SHOWWINDOW                   0x0018
    #define WM_WININICHANGE                 0x001A
    #if(WINVER >= 0x0400)
    #define WM_SETTINGCHANGE                WM_WININICHANGE
    #endif /* WINVER >= 0x0400 */
    
    
    #define WM_DEVMODECHANGE                0x001B
    #define WM_ACTIVATEAPP                  0x001C
    #define WM_FONTCHANGE                   0x001D
    #define WM_TIMECHANGE                   0x001E
    #define WM_CANCELMODE                   0x001F
    #define WM_SETCURSOR                    0x0020
    #define WM_MOUSEACTIVATE                0x0021
    #define WM_CHILDACTIVATE                0x0022
    #define WM_QUEUESYNC                    0x0023
    
    #define WM_GETMINMAXINFO                0x0024
    // end_r_winuser
    /*
     * Struct pointed to by WM_GETMINMAXINFO lParam
     */
    typedef struct tagMINMAXINFO {
        POINT ptReserved;
        POINT ptMaxSize;
        POINT ptMaxPosition;
        POINT ptMinTrackSize;
        POINT ptMaxTrackSize;
    } MINMAXINFO, *PMINMAXINFO, *LPMINMAXINFO;
    
    // begin_r_winuser
    #define WM_PAINTICON                    0x0026
    #define WM_ICONERASEBKGND               0x0027
    #define WM_NEXTDLGCTL                   0x0028
    #define WM_SPOOLERSTATUS                0x002A
    #define WM_DRAWITEM                     0x002B
    #define WM_MEASUREITEM                  0x002C
    #define WM_DELETEITEM                   0x002D
    #define WM_VKEYTOITEM                   0x002E
    #define WM_CHARTOITEM                   0x002F
    #define WM_SETFONT                      0x0030
    #define WM_GETFONT                      0x0031
    #define WM_SETHOTKEY                    0x0032
    #define WM_GETHOTKEY                    0x0033
    #define WM_QUERYDRAGICON                0x0037
    #define WM_COMPAREITEM                  0x0039
    #if(WINVER >= 0x0500)
    #define WM_GETOBJECT                    0x003D
    #endif /* WINVER >= 0x0500 */
    #define WM_COMPACTING                   0x0041
    #define WM_COMMNOTIFY                   0x0044  /* no longer suported */
    #define WM_WINDOWPOSCHANGING            0x0046
    #define WM_WINDOWPOSCHANGED             0x0047
    
    #define WM_POWER                        0x0048
    /*
     * wParam for WM_POWER window message and DRV_POWER driver notification
     */
    #define PWR_OK              1
    #define PWR_FAIL            (-1)
    #define PWR_SUSPENDREQUEST  1
    #define PWR_SUSPENDRESUME   2
    #define PWR_CRITICALRESUME  3
    
    #define WM_COPYDATA                     0x004A
    #define WM_CANCELJOURNAL                0x004B
    
    // end_r_winuser
    
    /*
     * lParam of WM_COPYDATA message points to...
     */
    typedef struct tagCOPYDATASTRUCT {
        DWORD dwData;
        DWORD cbData;
        PVOID lpData;
    } COPYDATASTRUCT, *PCOPYDATASTRUCT;
    
    // begin_r_winuser
    
    #if(WINVER >= 0x0400)
    #define WM_NOTIFY                       0x004E
    #define WM_INPUTLANGCHANGEREQUEST       0x0050
    #define WM_INPUTLANGCHANGE              0x0051
    #define WM_TCARD                        0x0052
    #define WM_HELP                         0x0053
    #define WM_USERCHANGED                  0x0054
    #define WM_NOTIFYFORMAT                 0x0055
    
    #define NFR_ANSI                             1
    #define NFR_UNICODE                          2
    #define NF_QUERY                             3
    #define NF_REQUERY                           4
    
    #define WM_CONTEXTMENU                  0x007B
    #define WM_STYLECHANGING                0x007C
    #define WM_STYLECHANGED                 0x007D
    #define WM_DISPLAYCHANGE                0x007E
    #define WM_GETICON                      0x007F
    #define WM_SETICON                      0x0080
    #endif /* WINVER >= 0x0400 */
    
    #define WM_NCCREATE                     0x0081
    #define WM_NCDESTROY                    0x0082
    #define WM_NCCALCSIZE                   0x0083
    #define WM_NCHITTEST                    0x0084
    #define WM_NCPAINT                      0x0085
    #define WM_NCACTIVATE                   0x0086
    #define WM_GETDLGCODE                   0x0087
    #define WM_SYNCPAINT                    0x0088
    #define WM_NCMOUSEMOVE                  0x00A0
    #define WM_NCLBUTTONDOWN                0x00A1
    #define WM_NCLBUTTONUP                  0x00A2
    #define WM_NCLBUTTONDBLCLK              0x00A3
    #define WM_NCRBUTTONDOWN                0x00A4
    #define WM_NCRBUTTONUP                  0x00A5
    #define WM_NCRBUTTONDBLCLK              0x00A6
    #define WM_NCMBUTTONDOWN                0x00A7
    #define WM_NCMBUTTONUP                  0x00A8
    #define WM_NCMBUTTONDBLCLK              0x00A9
    
    #define WM_KEYFIRST                     0x0100
    #define WM_KEYDOWN                      0x0100
    #define WM_KEYUP                        0x0101
    #define WM_CHAR                         0x0102
    #define WM_DEADCHAR                     0x0103
    #define WM_SYSKEYDOWN                   0x0104
    #define WM_SYSKEYUP                     0x0105
    #define WM_SYSCHAR                      0x0106
    #define WM_SYSDEADCHAR                  0x0107
    #define WM_KEYLAST                      0x0108
    
    #if(WINVER >= 0x0400)
    #define WM_IME_STARTCOMPOSITION         0x010D
    #define WM_IME_ENDCOMPOSITION           0x010E
    #define WM_IME_COMPOSITION              0x010F
    #define WM_IME_KEYLAST                  0x010F
    #endif /* WINVER >= 0x0400 */
    
    #define WM_INITDIALOG                   0x0110
    #define WM_COMMAND                      0x0111
    #define WM_SYSCOMMAND                   0x0112
    #define WM_TIMER                        0x0113
    #define WM_HSCROLL                      0x0114
    #define WM_VSCROLL                      0x0115
    #define WM_INITMENU                     0x0116
    #define WM_INITMENUPOPUP                0x0117
    #define WM_MENUSELECT                   0x011F
    #define WM_MENUCHAR                     0x0120
    #define WM_ENTERIDLE                    0x0121
    #if(WINVER >= 0x0500)
    #define WM_MENURBUTTONUP                0x0122
    #define WM_MENUDRAG                     0x0123
    #define WM_MENUGETOBJECT                0x0124
    #define WM_UNINITMENUPOPUP              0x0125
    #define WM_MENUCOMMAND                  0x0126
    #endif /* WINVER >= 0x0500 */
    
    
    #define WM_CTLCOLORMSGBOX               0x0132
    #define WM_CTLCOLOREDIT                 0x0133
    #define WM_CTLCOLORLISTBOX              0x0134
    #define WM_CTLCOLORBTN                  0x0135
    #define WM_CTLCOLORDLG                  0x0136
    #define WM_CTLCOLORSCROLLBAR            0x0137
    #define WM_CTLCOLORSTATIC               0x0138
    
    
    #define WM_MOUSEFIRST                   0x0200
    #define WM_MOUSEMOVE                    0x0200
    #define WM_LBUTTONDOWN                  0x0201
    #define WM_LBUTTONUP                    0x0202
    #define WM_LBUTTONDBLCLK                0x0203
    #define WM_RBUTTONDOWN                  0x0204
    #define WM_RBUTTONUP                    0x0205
    #define WM_RBUTTONDBLCLK                0x0206
    #define WM_MBUTTONDOWN                  0x0207
    #define WM_MBUTTONUP                    0x0208
    #define WM_MBUTTONDBLCLK                0x0209
    
    #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
    #define WM_MOUSEWHEEL                   0x020A
    #define WM_MOUSELAST                    0x020A
    #else
    #define WM_MOUSELAST                    0x0209
    #endif /* if (_WIN32_WINNT < 0x0400) */
    
    #if(_WIN32_WINNT >= 0x0400)
    #define WHEEL_DELTA                     120     /* Value for rolling one detent */
    #endif /* _WIN32_WINNT >= 0x0400 */
    #if(_WIN32_WINNT >= 0x0400)
    #define WHEEL_PAGESCROLL                (UINT_MAX) /* Scroll one page */
    #endif /* _WIN32_WINNT >= 0x0400 */
    
    #define WM_PARENTNOTIFY                 0x0210
    #define WM_ENTERMENULOOP                0x0211
    #define WM_EXITMENULOOP                 0x0212
    
    #if(WINVER >= 0x0400)
    #define WM_NEXTMENU                     0x0213
    // end_r_winuser
    
    typedef struct tagMDINEXTMENU
    {
        HMENU   hmenuIn;
        HMENU   hmenuNext;
        HWND    hwndNext;
    } MDINEXTMENU, * PMDINEXTMENU, FAR * LPMDINEXTMENU;
    
    // begin_r_winuser
    #define WM_SIZING                       0x0214
    #define WM_CAPTURECHANGED               0x0215
    #define WM_MOVING                       0x0216
    // end_r_winuser
    #define WM_POWERBROADCAST               0x0218      // r_winuser pbt
    // begin_pbt
    
    #define PBT_APMQUERYSUSPEND             0x0000
    #define PBT_APMQUERYSTANDBY             0x0001
    
    #define PBT_APMQUERYSUSPENDFAILED       0x0002
    #define PBT_APMQUERYSTANDBYFAILED       0x0003
    
    #define PBT_APMSUSPEND                  0x0004
    #define PBT_APMSTANDBY                  0x0005
    
    #define PBT_APMRESUMECRITICAL           0x0006
    #define PBT_APMRESUMESUSPEND            0x0007
    #define PBT_APMRESUMESTANDBY            0x0008
    
    #define PBTF_APMRESUMEFROMFAILURE       0x00000001
    
    #define PBT_APMBATTERYLOW               0x0009
    #define PBT_APMPOWERSTATUSCHANGE        0x000A
    
    #define PBT_APMOEMEVENT                 0x000B
    #define PBT_APMRESUMEAUTOMATIC          0x0012
    // end_pbt
    
    // begin_r_winuser
    #define WM_DEVICECHANGE                 0x0219
    
    #endif /* WINVER >= 0x0400 */
    
    #define WM_MDICREATE                    0x0220
    #define WM_MDIDESTROY                   0x0221
    #define WM_MDIACTIVATE                  0x0222
    #define WM_MDIRESTORE                   0x0223
    #define WM_MDINEXT                      0x0224
    #define WM_MDIMAXIMIZE                  0x0225
    #define WM_MDITILE                      0x0226
    #define WM_MDICASCADE                   0x0227
    #define WM_MDIICONARRANGE               0x0228
    #define WM_MDIGETACTIVE                 0x0229
    
    
    #define WM_MDISETMENU                   0x0230
    #define WM_ENTERSIZEMOVE                0x0231
    #define WM_EXITSIZEMOVE                 0x0232
    #define WM_DROPFILES                    0x0233
    #define WM_MDIREFRESHMENU               0x0234
    
    
    #if(WINVER >= 0x0400)
    #define WM_IME_SETCONTEXT               0x0281
    #define WM_IME_NOTIFY                   0x0282
    #define WM_IME_CONTROL                  0x0283
    #define WM_IME_COMPOSITIONFULL          0x0284
    #define WM_IME_SELECT                   0x0285
    #define WM_IME_CHAR                     0x0286
    #endif /* WINVER >= 0x0400 */
    #if(WINVER >= 0x0500)
    #define WM_IME_REQUEST                  0x0288
    #endif /* WINVER >= 0x0500 */
    #if(WINVER >= 0x0400)
    #define WM_IME_KEYDOWN                  0x0290
    #define WM_IME_KEYUP                    0x0291
    #endif /* WINVER >= 0x0400 */
    
    
    #if(_WIN32_WINNT >= 0x0400)
    #define WM_MOUSEHOVER                   0x02A1
    #define WM_MOUSELEAVE                   0x02A3
    #endif /* _WIN32_WINNT >= 0x0400 */
    
    #define WM_CUT                          0x0300
    #define WM_COPY                         0x0301
    #define WM_PASTE                        0x0302
    #define WM_CLEAR                        0x0303
    #define WM_UNDO                         0x0304
    #define WM_RENDERFORMAT                 0x0305
    #define WM_RENDERALLFORMATS             0x0306
    #define WM_DESTROYCLIPBOARD             0x0307
    #define WM_DRAWCLIPBOARD                0x0308
    #define WM_PAINTCLIPBOARD               0x0309
    #define WM_VSCROLLCLIPBOARD             0x030A
    #define WM_SIZECLIPBOARD                0x030B
    #define WM_ASKCBFORMATNAME              0x030C
    #define WM_CHANGECBCHAIN                0x030D
    #define WM_HSCROLLCLIPBOARD             0x030E
    #define WM_QUERYNEWPALETTE              0x030F
    #define WM_PALETTEISCHANGING            0x0310
    #define WM_PALETTECHANGED               0x0311
    #define WM_HOTKEY                       0x0312
    
    #if(WINVER >= 0x0400)
    #define WM_PRINT                        0x0317
    #define WM_PRINTCLIENT                  0x0318
    
    #define WM_HANDHELDFIRST                0x0358
    #define WM_HANDHELDLAST                 0x035F
    
    #define WM_AFXFIRST                     0x0360
    #define WM_AFXLAST                      0x037F
    #endif /* WINVER >= 0x0400 */
    
    #define WM_PENWINFIRST                  0x0380
    #define WM_PENWINLAST                   0x038F
    
    
    #if(WINVER >= 0x0400)
    #define WM_APP                          0x8000
    #endif /* WINVER >= 0x0400 */
    
    
    /*
     * NOTE: All Message Numbers below 0x0400 are RESERVED.
     *
     * Private Window Messages Start Here:
     */
    #define WM_USER                         0x0400
    
    #if(WINVER >= 0x0400)
    
    /*  wParam for WM_SIZING message  */
    #define WMSZ_LEFT           1
    #define WMSZ_RIGHT          2
    #define WMSZ_TOP            3
    #define WMSZ_TOPLEFT        4
    #define WMSZ_TOPRIGHT       5
    #define WMSZ_BOTTOM         6
    #define WMSZ_BOTTOMLEFT     7
    #define WMSZ_BOTTOMRIGHT    8
    #endif /* WINVER >= 0x0400 */
    
    #ifndef NONCMESSAGES
    
    ----
    MFC
    Valid XHTML 1.0! Valid CSS! powered by MoniWiki
    last modified 2021-02-07 05:23:42
    Processing time 0.0359 sec