Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Minor Bug?: Symbols Within BEGIN_MESSAGE_MAP block
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wlater
Senior Member

USA
35 Posts

Posted - Nov 07 2008 :  11:47:40 AM  Show Profile  Reply with Quote
I have what I think is a minor bug (VA Version 10.4.1649.0, Visual Studio 2008 SP1) with unrecognized symbols with MFC within the BEGIN_MESSAGE_MAP and END_MESSAGE_MAP macros. The short snippet below shows the issue. I get the OnOK symbol below underlined with the red squiggly for an unrecognized symbol. Using the full CTestDialog::OnOK name allows VisualAssist to recognize it. Looks like Visual Assist is not fully dealing with the expansion of the BEGIN_MESSAGE_MAP macro and so doesn't recognize the unadorned OnOK symbol. The compiler is perfectly happy with the unadorned OnOK as expected.

class CTestDialog : public CDialog
{
protected:

   afx_msg void OnOK();

   DECLARE_MESSAGE_MAP()
};

BEGIN_MESSAGE_MAP(CTestDialog, CDialog)
   ON_BN_CLICKED(IDOK, OnOK) 
   ON_BN_CLICKED(IDOK, CTestDialog::OnOK) 
END_MESSAGE_MAP()

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 09 2008 :  09:37:54 AM  Show Profile  Reply with Quote
Can you please try to turn off limited macro parsing to see if this helps?

http://docs.wholetomato.com?W363

Edited by - accord on Nov 09 2008 09:39:06 AM
Go to Top of Page

wlater
Senior Member

USA
35 Posts

Posted - Nov 10 2008 :  3:29:26 PM  Show Profile  Reply with Quote
OK, I think it's working now. I tried the registry changes but that did not seem to work. I then tried the other link discussing VAX's stdafx.h file. While trying to get my copy of stdafx.h to work correctly to fix the problem, the underlining behavior was suddenly correct. I then went back to the default stdafx.h in the VAX directory and underlining was still correct.

All I can think of is that the stdafx.h steps involved rebuilding the symbol database and that's also needed for the registry approach. Is that correct? Should the registry setting instructions include rebuilding the symbol database? Kinda makes sense to me now that I've been through this.

Anyway, it works correctly now. So thanks for the help.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 10 2008 :  3:50:17 PM  Show Profile  Reply with Quote
I don't think that opening stdafx.h causes full rebuilding of symbol databases, but opening files causes rebuilding parts of it. Maybe good idea to include rebuilding instruction to the end of the FAQ entry.

I'm glad it worked
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000