Click here to Skip to main content
16,007,932 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to draw a line with mouse? Pin
Blake Coverett22-Sep-03 23:39
Blake Coverett22-Sep-03 23:39 
GeneralA ridiculous beginners question Pin
Terry O'Nolley22-Sep-03 17:23
Terry O'Nolley22-Sep-03 17:23 
GeneralRe: A ridiculous beginners question Pin
Nish Nishant22-Sep-03 17:39
sitebuilderNish Nishant22-Sep-03 17:39 
GeneralRe: A ridiculous beginners question Pin
Terry O'Nolley22-Sep-03 17:54
Terry O'Nolley22-Sep-03 17:54 
GeneralRe: A ridiculous beginners question Pin
Nish Nishant22-Sep-03 18:19
sitebuilderNish Nishant22-Sep-03 18:19 
GeneralRe: A ridiculous beginners question Pin
Terry O'Nolley22-Sep-03 19:15
Terry O'Nolley22-Sep-03 19:15 
GeneralRe: A ridiculous beginners question Pin
Nish Nishant22-Sep-03 19:17
sitebuilderNish Nishant22-Sep-03 19:17 
GeneralRe: A ridiculous beginners question Pin
Terry O'Nolley23-Sep-03 7:53
Terry O'Nolley23-Sep-03 7:53 
I know this. But your first suggestion told me to include the header file in the .cppp file for Window 2 to avoid the "duplicate class name" error. I couldn't do this, because there was a member variable of tyoe ClassX in Window2.

When presented with the preprocessor directives, I implemented them and it fixed the problem but you said this was not a preferred technique because of portability concerns.

How would you do this without preprocessor directives?

ClassX

Window1 : has a member var of ClassX so needs #include ClassX.h
Window2 : has a member var of ClassX so needs #include ClassX.h

if I include them both where you have agreed they need to be ie before the ClassX object is defined I get a compiler error of a duplicate class name.

If I include them where you first told me (in the CPP file before the window header) I get an undefined name error.

Using preprocessor directives allowed me to successfully do what I needed but you said it was a poor solution.

I would like to know the correct solution.








GeneralRe: A ridiculous beginners question Pin
Michael Dunn22-Sep-03 17:58
sitebuilderMichael Dunn22-Sep-03 17:58 
GeneralRe: A ridiculous beginners question Pin
Terry O'Nolley22-Sep-03 18:15
Terry O'Nolley22-Sep-03 18:15 
GeneralRe: A ridiculous beginners question Pin
Rick York22-Sep-03 18:26
mveRick York22-Sep-03 18:26 
GeneralRe: A ridiculous beginners question Pin
Alvaro Mendez23-Sep-03 4:22
Alvaro Mendez23-Sep-03 4:22 
GeneralRe: A ridiculous beginners question Pin
Rick York24-Sep-03 14:09
mveRick York24-Sep-03 14:09 
GeneralRe: A ridiculous beginners question Pin
John M. Drescher22-Sep-03 18:02
John M. Drescher22-Sep-03 18:02 
GeneralRe: A ridiculous beginners question Pin
Terry O'Nolley22-Sep-03 18:20
Terry O'Nolley22-Sep-03 18:20 
GeneralRe: A ridiculous beginners question Pin
John M. Drescher22-Sep-03 18:30
John M. Drescher22-Sep-03 18:30 
GeneralCallbacks Pin
halblonious22-Sep-03 16:50
halblonious22-Sep-03 16:50 
GeneralRe: Callbacks Pin
Phil Speller22-Sep-03 22:14
Phil Speller22-Sep-03 22:14 
GeneralRe: Callbacks Pin
halblonious23-Sep-03 11:35
halblonious23-Sep-03 11:35 
GeneralRe: Callbacks Pin
Member 42425922-Sep-03 22:14
Member 42425922-Sep-03 22:14 
GeneralRe: Callbacks Pin
halblonious23-Sep-03 11:37
halblonious23-Sep-03 11:37 
GeneralRe: Callbacks Pin
David Crow23-Sep-03 3:07
David Crow23-Sep-03 3:07 
GeneralRe: Callbacks Pin
halblonious23-Sep-03 11:36
halblonious23-Sep-03 11:36 
Questionhow i can get the WM_POWERBROADCAST Pin
vancuver22-Sep-03 16:44
vancuver22-Sep-03 16:44 
AnswerRe: how i can get the WM_POWERBROADCAST Pin
Mike Dimmick23-Sep-03 1:01
Mike Dimmick23-Sep-03 1: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.