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
 [1722 b]can't parse #define Directive in stdafx.h?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

orochi_cn
New Member

4 Posts

Posted - Apr 29 2009 :  07:37:56 AM  Show Profile  Reply with Quote
In vs2008 sp1, create a wince c++ project, define a macro in stdafx.h:
#ifdef _UNICODE
#define tstring wstring
#define tofstream wofstream
#endif
then write code in main.cpp:
void test()
{
tstring str1;
......
}

the color of "str1" is black, when i type "str1.", don't display the member function of "str1".

when I move the macro define to main.h, all works ok.

feline
Whole Tomato Software

United Kingdom
18952 Posts

Posted - Apr 29 2009 :  1:05:15 PM  Show Profile  Reply with Quote
What do you mean by a "wince C++" project? I have just installed the Smart Device components for VS2008, but I am not seeing a wince option in the new project dialog.

I have "MFC Smart Device Application", but I don't know if that is the same thing or not.

In your test solution, if you make sure "stdafx.h" is closed, and then show VA's OFIW dialog, is "stdafx.h" listed in this dialog? I am wondering if VA realises it should be parsing this header file.

zen is the art of being at one with the two'ness
Go to Top of Page

orochi_cn
New Member

4 Posts

Posted - May 01 2009 :  04:55:54 AM  Show Profile  Reply with Quote
yes, this is a MFC Smart Device Application.
OFIW? what do you means?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18952 Posts

Posted - May 01 2009 :  1:33:09 PM  Show Profile  Reply with Quote
Sorry about that, OFIW is the Open File In Workspace / Solution window. The normal keyboard shortcut is ALT-SHIFT-O. I normally use this short hand name, but not everyone knows what it means.

I am seeing the same effect here. Thank you for the clear description.

case=26509

I am not seeing any obvious trigger, and none of the standard fixes seem to be helping. For now you are going to need to add these macro's to a different header file if VA is to understand them correctly.

zen is the art of being at one with the two'ness
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