BEGIN_MSG_MAP Macro and ATL

Just starting out? Need help? Post your questions and find answers here.
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

BEGIN_MSG_MAP Macro and ATL

Post by SFSxOI »

Below is an ATL BEGIN_MSG_MAP macro. I need to convert this for PureBasic and i'm having a terrible time getting it to work (I think). I understand what it does but turning that into a reality for PureBasic is proving to be a big pain.

Code: Select all

BEGIN_MSG_MAP(CMainFrame)
  MESSAGE_HANDLER(WM_CREATE, OnCreate)
  COMMAND_ID_HANDLER(ID_APP_EXIT, OnFileExit)
  COMMAND_ID_HANDLER(ID_FILE_NEW, OnFileNew)
  COMMAND_ID_HANDLER(ID_APP_ABOUT, OnAppAbout)
  CHAIN_MSG_MAP(WTL::CFrameWindowImpl<CMainFrame>)
END_MSG_MAP()
Would this be better implemented as a Select-Case-EndSelect (what would that like)? I'd like to be able to keep the Macro type and be able to just define it once and call it when I need it - can a Select-Case-EndSelect be in a Macro? Or is this a structure?

Can anyone offer any suggestions?