what's theClass for in BEGIN_MSG_MAP(theClass)?
-
I find that in ATL, the macro BEGIN_MSG_MAP(theClass) is defined this way:
#define BEGIN_MSG_MAP(theClass) \ public: \ BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lResult, DWORD dwMsgMapID = 0) \ { \ BOOL bHandled = TRUE; \ hWnd; \ uMsg; \ wParam; \ lParam; \ lResult; \ bHandled; \ switch(dwMsgMapID) \ { \ case 0:
Interestingly,theClass
is not used anywhere, then what's the use oftheClass
here? Thanks. -
I find that in ATL, the macro BEGIN_MSG_MAP(theClass) is defined this way:
#define BEGIN_MSG_MAP(theClass) \ public: \ BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lResult, DWORD dwMsgMapID = 0) \ { \ BOOL bHandled = TRUE; \ hWnd; \ uMsg; \ wParam; \ lParam; \ lResult; \ bHandled; \ switch(dwMsgMapID) \ { \ case 0:
Interestingly,theClass
is not used anywhere, then what's the use oftheClass
here? Thanks.Strange !
Prasad Notifier using ATL | Operator new[],delete[][^]
-
I find that in ATL, the macro BEGIN_MSG_MAP(theClass) is defined this way:
#define BEGIN_MSG_MAP(theClass) \ public: \ BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lResult, DWORD dwMsgMapID = 0) \ { \ BOOL bHandled = TRUE; \ hWnd; \ uMsg; \ wParam; \ lParam; \ lResult; \ bHandled; \ switch(dwMsgMapID) \ { \ case 0:
Interestingly,theClass
is not used anywhere, then what's the use oftheClass
here? Thanks.Probably either a) consistency with MFC map macros, or b) in case it's needed in the future?
-
I find that in ATL, the macro BEGIN_MSG_MAP(theClass) is defined this way:
#define BEGIN_MSG_MAP(theClass) \ public: \ BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lResult, DWORD dwMsgMapID = 0) \ { \ BOOL bHandled = TRUE; \ hWnd; \ uMsg; \ wParam; \ lParam; \ lResult; \ bHandled; \ switch(dwMsgMapID) \ { \ case 0:
Interestingly,theClass
is not used anywhere, then what's the use oftheClass
here? Thanks.