Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 [1722 b]can't parse #define Directive in stdafx.h?

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
orochi_cn Posted - Apr 29 2009 : 07:37:56 AM
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.
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - May 01 2009 : 1:33:09 PM
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.
orochi_cn Posted - May 01 2009 : 04:55:54 AM
yes, this is a MFC Smart Device Application.
OFIW? what do you means?
feline Posted - Apr 29 2009 : 1:05:15 PM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000