Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. what's theClass for in BEGIN_MSG_MAP(theClass)?

what's theClass for in BEGIN_MSG_MAP(theClass)?

Scheduled Pinned Locked Moved ATL / WTL / STL
c++question
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rockonedge
    wrote on last edited by
    #1

    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 of theClass here? Thanks.

    P S S 3 Replies Last reply
    0
    • R rockonedge

      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 of theClass here? Thanks.

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      Strange !

      Prasad Notifier using ATL | Operator new[],delete[][^]

      1 Reply Last reply
      0
      • R rockonedge

        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 of theClass here? Thanks.

        S Offline
        S Offline
        Stuart Dootson
        wrote on last edited by
        #3

        Probably either a) consistency with MFC map macros, or b) in case it's needed in the future?

        1 Reply Last reply
        0
        • R rockonedge

          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 of theClass here? Thanks.

          S Offline
          S Offline
          Steve S
          wrote on last edited by
          #4

          It's probably for compatibility with MFC :)

          Steve S Developer for hire

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups