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. Template and message map

Template and message map

Scheduled Pinned Locked Moved ATL / WTL / STL
csharpquestionc++delphivisual-studio
2 Posts 2 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.
  • S Offline
    S Offline
    Stephane David
    wrote on last edited by
    #1

    In my application, I'm using template controls to change the font and colors of any of my MFC controls. As I need some messages, I have a message map like that. BEGIN_TEMPLATE_MESSAGE_MAP(class BASE_TYPE, CColorCtrl, BASE_TYPE) //BEGIN_MESSAGE_MAP(class BASE_TYPE, CColorCtrl, BASE_TYPE) //{{AFX_MSG_MAP(CColorCtrl) ON_WM_CTLCOLOR_REFLECT() ON_WM_CTLCOLOR() ON_WM_DESTROY() ON_WM_TIMER() ON_WM_CREATE() //}}AFX_MSG_MAP END_TEMPLATE_MESSAGE_MAP() The BEGIN_TEMPLATE_MESSAGE_MAP macro is defined here. #define BEGIN_TEMPLATE_MESSAGE_MAP(theTemplArgs, theClass, baseClass) \ template \ const AFX_MSGMAP* PASCAL theClass::_GetBaseMessageMap() \ { return &baseClass::messageMap; } \ template \ const AFX_MSGMAP* theClass::GetMessageMap() const \ { return &theClass::messageMap; } \ template \ AFX_COMDAT AFX_DATADEF const AFX_MSGMAP theClass::messageMap = \ { &theClass::_GetBaseMessageMap, &theClass::_messageEntries[0] }; \ template \ AFX_COMDAT const AFX_MSGMAP_ENTRY theClass::_messageEntries[] = \ { \ My pb is I get an error message saying that "_GetBaseMessageMap" is not a member of CColorCtrl. The code was working with Visual Studio 6.0, but does no longer work with Visual Studio .Net How can I port it to .Net?

    U 1 Reply Last reply
    0
    • S Stephane David

      In my application, I'm using template controls to change the font and colors of any of my MFC controls. As I need some messages, I have a message map like that. BEGIN_TEMPLATE_MESSAGE_MAP(class BASE_TYPE, CColorCtrl, BASE_TYPE) //BEGIN_MESSAGE_MAP(class BASE_TYPE, CColorCtrl, BASE_TYPE) //{{AFX_MSG_MAP(CColorCtrl) ON_WM_CTLCOLOR_REFLECT() ON_WM_CTLCOLOR() ON_WM_DESTROY() ON_WM_TIMER() ON_WM_CREATE() //}}AFX_MSG_MAP END_TEMPLATE_MESSAGE_MAP() The BEGIN_TEMPLATE_MESSAGE_MAP macro is defined here. #define BEGIN_TEMPLATE_MESSAGE_MAP(theTemplArgs, theClass, baseClass) \ template \ const AFX_MSGMAP* PASCAL theClass::_GetBaseMessageMap() \ { return &baseClass::messageMap; } \ template \ const AFX_MSGMAP* theClass::GetMessageMap() const \ { return &theClass::messageMap; } \ template \ AFX_COMDAT AFX_DATADEF const AFX_MSGMAP theClass::messageMap = \ { &theClass::_GetBaseMessageMap, &theClass::_messageEntries[0] }; \ template \ AFX_COMDAT const AFX_MSGMAP_ENTRY theClass::_messageEntries[] = \ { \ My pb is I get an error message saying that "_GetBaseMessageMap" is not a member of CColorCtrl. The code was working with Visual Studio 6.0, but does no longer work with Visual Studio .Net How can I port it to .Net?

      U Offline
      U Offline
      User 2020042
      wrote on last edited by
      #2

      Hi, did you solve the problem with _GetBaseMessageMap in VC7? I ran into the same.

      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