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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. ATL_MSG_MAP identifier not found

ATL_MSG_MAP identifier not found

Scheduled Pinned Locked Moved ATL / WTL / STL
c++help
11 Posts 2 Posters 2 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.
  • J josip cagalj

    Hi, it seems that only I post questions around here, not a happy site :) However, here I am having problems again. This time I get to play around with dialogs and controls guided by article series from Michael Dunn called "WTL for MFC programmers and something". The problem is I can't add map entry

    ATL\_MSG\_MAP(1)
    	MSG\_WM\_SETCURSOR(OnSetCursor\_OK)
    

    I'm getting errors: "syntax error : missing ';' before identifier 'MSG_WM_SETCURSOR'" "'ATL_MSG_MAP': identifier not found" "'OnSetCursor_OK' : undeclared identifier" I'm on WinXP using VS2008 Thanks in advance

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

    I think that should be A**LT**_MSG_MAP - ALT, not ATL. You'll need to #include atlwin.h.

    J 1 Reply Last reply
    0
    • S Stuart Dootson

      I think that should be A**LT**_MSG_MAP - ALT, not ATL. You'll need to #include atlwin.h.

      J Offline
      J Offline
      josip cagalj
      wrote on last edited by
      #3

      I already included atlwin.h in stdafx.h! Don't quite understand your replay "I think that should be ALT_MSG_MAP - ALT, not ATL"? Anyway big thanks to you!

      S 1 Reply Last reply
      0
      • J josip cagalj

        I already included atlwin.h in stdafx.h! Don't quite understand your replay "I think that should be ALT_MSG_MAP - ALT, not ATL"? Anyway big thanks to you!

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

        You typed "ATL_MSG_MAP" in your original message. That symbol isn't in ATL, but ALT_MSG_MAP is, i.e. I think you made a typo at some point.

        J 1 Reply Last reply
        0
        • S Stuart Dootson

          You typed "ATL_MSG_MAP" in your original message. That symbol isn't in ATL, but ALT_MSG_MAP is, i.e. I think you made a typo at some point.

          J Offline
          J Offline
          josip cagalj
          wrote on last edited by
          #5

          Need your help again, this time it's about adding notify handler for LVN_ITEMCHANGED message which is sent from listview ctrl. NOTIFY_HANDLER_EX(IDC_LIST,LVN_ITEMCHANGED,OnListItemchanged) I've included atlcrack.h but still get complaints? I know that I'm trying to use code for WTL 7/7.1 while I have WTL 9 installed on VS2008 but I'm stern to go trough the series of articles here on CP by Dunn. And sorry if I'm a pain to you :^)

          J S 2 Replies Last reply
          0
          • J josip cagalj

            Need your help again, this time it's about adding notify handler for LVN_ITEMCHANGED message which is sent from listview ctrl. NOTIFY_HANDLER_EX(IDC_LIST,LVN_ITEMCHANGED,OnListItemchanged) I've included atlcrack.h but still get complaints? I know that I'm trying to use code for WTL 7/7.1 while I have WTL 9 installed on VS2008 but I'm stern to go trough the series of articles here on CP by Dunn. And sorry if I'm a pain to you :^)

            J Offline
            J Offline
            josip cagalj
            wrote on last edited by
            #6

            Solved the entry was in the wrong map!

            1 Reply Last reply
            0
            • J josip cagalj

              Need your help again, this time it's about adding notify handler for LVN_ITEMCHANGED message which is sent from listview ctrl. NOTIFY_HANDLER_EX(IDC_LIST,LVN_ITEMCHANGED,OnListItemchanged) I've included atlcrack.h but still get complaints? I know that I'm trying to use code for WTL 7/7.1 while I have WTL 9 installed on VS2008 but I'm stern to go trough the series of articles here on CP by Dunn. And sorry if I'm a pain to you :^)

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

              josip cagalj wrote:

              I'm stern to go trough the series of articles here on CP by Dunn

              They're good articles - Michael's (to my mind) one of the most knowledgeable WTL experts.

              josip cagalj wrote:

              sorry if I'm a pain to you

              If you were, I probably wouldn't be answering your questions :-)

              J 1 Reply Last reply
              0
              • S Stuart Dootson

                josip cagalj wrote:

                I'm stern to go trough the series of articles here on CP by Dunn

                They're good articles - Michael's (to my mind) one of the most knowledgeable WTL experts.

                josip cagalj wrote:

                sorry if I'm a pain to you

                If you were, I probably wouldn't be answering your questions :-)

                J Offline
                J Offline
                josip cagalj
                wrote on last edited by
                #8

                Thanks for previous post. I tried to add a dialog to my app so after designing one mfc wizard showed up for adding a class for the new dialog so I followed it. When I compiled afterward i got an error saying "fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include ", I deleted the dialog and corresponding *.h and *.cpp from project but the error persist? I think I need to skip the mfc wizard and manually add an class for the new dialog I've designed class: class CMyNewDlg : public CDialogImpl, public CWinDataExchange { public: enum { IDD = IDD_MYNEWDLG }; CMyNewDlg(); ... If so can I add this in existing .h file like CMainDlg.h or I need to manually add CMyNewDlg.h and CMyNewDlg.cpp files?

                S 1 Reply Last reply
                0
                • J josip cagalj

                  Thanks for previous post. I tried to add a dialog to my app so after designing one mfc wizard showed up for adding a class for the new dialog so I followed it. When I compiled afterward i got an error saying "fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include ", I deleted the dialog and corresponding *.h and *.cpp from project but the error persist? I think I need to skip the mfc wizard and manually add an class for the new dialog I've designed class: class CMyNewDlg : public CDialogImpl, public CWinDataExchange { public: enum { IDD = IDD_MYNEWDLG }; CMyNewDlg(); ... If so can I add this in existing .h file like CMainDlg.h or I need to manually add CMyNewDlg.h and CMyNewDlg.cpp files?

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

                  It probably added one or more MFC include files (afx.h?) to your stdafx.h. Remove those.

                  J 1 Reply Last reply
                  0
                  • S Stuart Dootson

                    It probably added one or more MFC include files (afx.h?) to your stdafx.h. Remove those.

                    J Offline
                    J Offline
                    josip cagalj
                    wrote on last edited by
                    #10

                    What this means: error C2039: 'SubclassWindow' : is not a member of 'WTL::CTreeViewCtrlT' I've placed an treeview ctrl on my new dlg and everything is ok when I use m_wndTree.Attach(GetDlgItem(IDC_TREE)); but when I want to use DDX_CONTROL like this

                    BEGIN\_DDX\_MAP(CMyTreeDlg)
                    	DDX\_CONTROL(IDC\_TREE, m\_wndTree)
                    END\_DDX\_MAP()
                    

                    I get above error

                    S 1 Reply Last reply
                    0
                    • J josip cagalj

                      What this means: error C2039: 'SubclassWindow' : is not a member of 'WTL::CTreeViewCtrlT' I've placed an treeview ctrl on my new dlg and everything is ok when I use m_wndTree.Attach(GetDlgItem(IDC_TREE)); but when I want to use DDX_CONTROL like this

                      BEGIN\_DDX\_MAP(CMyTreeDlg)
                      	DDX\_CONTROL(IDC\_TREE, m\_wndTree)
                      END\_DDX\_MAP()
                      

                      I get above error

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

                      I believe you need to declare m_wndTree with type CContainedWindowT< CTreeViewCtrl > for it to have a SubclassWindow member. [edit]You also need to construct m_wndTree correctly:

                      1. If m_wndTree doesn't have a message map (using ALT_MSG_MAP)

                        CMyTreeDlg() : m_wndTree(this)
                        . . .
                        . . .

                      2. If m_wndTree has a message map (using ALT_MSG_MAP(_number_)

                        CMyTreeDlg() : m_wndTree(this, number)
                        . . .
                        . . .

                      [/edit]

                      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