Click here to Skip to main content
15,921,179 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralConverting source code to UML Pin
Anonymous12-May-03 9:54
Anonymous12-May-03 9:54 
GeneralRe: Converting source code to UML Pin
Andrew Walker12-May-03 12:59
Andrew Walker12-May-03 12:59 
Questionhow to display icon with items in a list view? Pin
djghazi12-May-03 8:44
djghazi12-May-03 8:44 
AnswerRe: how to display icon with items in a list view? Pin
David Crow12-May-03 9:47
David Crow12-May-03 9:47 
GeneralRe: how to display icon with items in a list view? Pin
djghazi12-May-03 9:54
djghazi12-May-03 9:54 
GeneralRe: how to display icon with items in a list view? Pin
djghazi12-May-03 10:03
djghazi12-May-03 10:03 
GeneralRe: how to display icon with items in a list view? Pin
David Crow13-May-03 2:22
David Crow13-May-03 2:22 
GeneralProblem w/ preprocessor Pin
Dean Goodman12-May-03 8:06
Dean Goodman12-May-03 8:06 
So I have a class that does not make use of MFC/Windows code in any way, though I sometimes use it in MFC projects. However, when I do use the class in an MFC project, VS.net complains that there is no '#include "stdafx.h"' line in the .cpp file of the class. Likewise, if I add the line to my file and use the class in a non-MFC project, as you would expect, I get a 'cannot find file "stdafx.h"' (since it doesn't exist in the non-MFC project.)

Today I tried to remedy this situation by adding an #ifdef at the beginning of the .cpp file as follows:

#ifdef WINVER 
//wasn't sure about the best one to use
//if you know of something better than WINVER, please let me know
#include "stdafx.h"
#endif

... other includes

... implementation of class


However, if I add this code (at the very beginning of the file) VS.Net chokes with "fatal error C1020: unexpected #endif".

Any ideas?

--Dean
GeneralRe: Problem w/ preprocessor Pin
Joaquín M López Muñoz12-May-03 8:54
Joaquín M López Muñoz12-May-03 8:54 
GeneralRe: Problem w/ preprocessor Pin
John R. Shaw12-May-03 8:54
John R. Shaw12-May-03 8:54 
GeneralRe: Problem w/ preprocessor Pin
Dean Goodman12-May-03 9:11
Dean Goodman12-May-03 9:11 
GeneralRe: Problem w/ preprocessor Pin
Joaquín M López Muñoz12-May-03 11:21
Joaquín M López Muñoz12-May-03 11:21 
GeneralRe: Problem w/ preprocessor Pin
Anders Molin12-May-03 9:12
professionalAnders Molin12-May-03 9:12 
GeneralRe: Problem w/ preprocessor Pin
Dean Goodman12-May-03 9:52
Dean Goodman12-May-03 9:52 
GeneralRe: Problem w/ preprocessor Pin
Anders Molin12-May-03 10:27
professionalAnders Molin12-May-03 10:27 
GeneralRe: Problem w/ preprocessor Pin
basementman13-May-03 7:25
basementman13-May-03 7:25 
QuestionHow to use GetDlgItemText to get unicode? Pin
ari_jas12-May-03 8:05
ari_jas12-May-03 8:05 
AnswerRe: How to use GetDlgItemText to get unicode? Pin
David Crow12-May-03 8:15
David Crow12-May-03 8:15 
GeneralRe: How to use GetDlgItemText to get unicode? Pin
ari_jas12-May-03 21:17
ari_jas12-May-03 21:17 
GeneralSearch Classes... Pin
JoeSox12-May-03 7:36
JoeSox12-May-03 7:36 
GeneralRe: Search Classes... Pin
David Crow12-May-03 8:00
David Crow12-May-03 8:00 
GeneralRe: Search Classes... Pin
JoeSox12-May-03 8:06
JoeSox12-May-03 8:06 
Questionquery the no. of files selected using CFileDialog? Pin
Neel Abraham12-May-03 7:36
Neel Abraham12-May-03 7:36 
AnswerRe: query the no. of files selected using CFileDialog? Pin
David Crow12-May-03 8:03
David Crow12-May-03 8:03 
AnswerRe: query the no. of files selected using CFileDialog? Pin
John R. Shaw12-May-03 9:01
John R. Shaw12-May-03 9:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.