ATL_MSG_MAP identifier not found
-
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
-
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
I think that should be
A**LT**_MSG_MAP
-ALT
, notATL
. You'll need to#include
atlwin.h
. -
I think that should be
A**LT**_MSG_MAP
-ALT
, notATL
. You'll need to#include
atlwin.h
.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!
-
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!
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.
-
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.
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 :^) -
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 :^)Solved the entry was in the wrong map!
-
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 :^)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 :-)
-
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 :-)
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?
-
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?
It probably added one or more MFC include files (afx.h?) to your stdafx.h. Remove those.
-
It probably added one or more MFC include files (afx.h?) to your stdafx.h. Remove those.
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 usem_wndTree.Attach(GetDlgItem(IDC_TREE));
but when I want to use DDX_CONTROL like thisBEGIN\_DDX\_MAP(CMyTreeDlg) DDX\_CONTROL(IDC\_TREE, m\_wndTree) END\_DDX\_MAP()
I get above error
-
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 usem_wndTree.Attach(GetDlgItem(IDC_TREE));
but when I want to use DDX_CONTROL like thisBEGIN\_DDX\_MAP(CMyTreeDlg) DDX\_CONTROL(IDC\_TREE, m\_wndTree) END\_DDX\_MAP()
I get above error
I believe you need to declare
m_wndTree
with typeCContainedWindowT< CTreeViewCtrl >
for it to have aSubclassWindow
member. [edit]You also need to constructm_wndTree
correctly:-
If
m_wndTree
doesn't have a message map (usingALT_MSG_MAP
)CMyTreeDlg() : m_wndTree(this)
. . .
. . . -
If
m_wndTree
has a message map (usingALT_MSG_MAP(_number_
)CMyTreeDlg() : m_wndTree(this, number)
. . .
. . .
[/edit]
-