Click here to Skip to main content
15,906,816 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionafxOccMgr and pWndCtrl problems Pin
earlgraham13-Nov-06 6:36
earlgraham13-Nov-06 6:36 
QuestionMultiLanguage Engine Pin
dannygilbert313-Nov-06 6:11
dannygilbert313-Nov-06 6:11 
AnswerRe: MultiLanguage Engine Pin
toxcct13-Nov-06 6:19
toxcct13-Nov-06 6:19 
AnswerRe: MultiLanguage Engine Pin
ThatsAlok13-Nov-06 7:00
ThatsAlok13-Nov-06 7:00 
QuestionExtern and CLASS Pin
dannygilbert313-Nov-06 6:10
dannygilbert313-Nov-06 6:10 
AnswerRe: Extern and CLASS Pin
Mark Salsbery13-Nov-06 6:16
Mark Salsbery13-Nov-06 6:16 
AnswerRe: Extern and CLASS Pin
toxcct13-Nov-06 6:17
toxcct13-Nov-06 6:17 
AnswerRe: Extern and CLASS Pin
James R. Twine13-Nov-06 6:26
James R. Twine13-Nov-06 6:26 
   If you only need to declare pointers or references to those other classes, you can do a forward declaration (I believe that is what it is called) by putting code like this:
     class CClass;
     class CSomeOtherClass;
   Before the code that declare pointers/references to that class.
class CClass;
class CSomeOtherClass;
 
class CMyClass
{
   public:
   CMyClass( CClass *pClass );
   CMyClass( CSomeOtherClass &socSomeOtherClass );
   <code>CMyClass( CAnotherClass *pAnotherClass );</code>     <code>// This One Will Not Compile</code>
   <code>CMyClass( CAnotherClass &cacAnotherClass );</code>   <code>// This One Will Not Compile</code>
};
   If you need to actually access members of the class, then you need to include the entire declaration of the class (usually by including its .H file).  This is usually required in the CPP file for the class that uses the other classes.  Be careful throwing includes around freely if you are not fully familiar with the code, you can introduce dependency problems and/or mess up your build times.

   Peace!


-=- James
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
DeleteFXPFiles & CheckFavorites
(Please rate this post!)

AnswerRe: Extern and CLASS Pin
ThatsAlok13-Nov-06 7:00
ThatsAlok13-Nov-06 7:00 
Question2 CFileDialogs Pin
Desmo1613-Nov-06 6:07
Desmo1613-Nov-06 6:07 
AnswerRe: 2 CFileDialogs Pin
James R. Twine13-Nov-06 6:09
James R. Twine13-Nov-06 6:09 
AnswerRe: 2 CFileDialogs Pin
toxcct13-Nov-06 6:09
toxcct13-Nov-06 6:09 
GeneralRe: 2 CFileDialogs Pin
Desmo1613-Nov-06 6:36
Desmo1613-Nov-06 6:36 
GeneralRe: 2 CFileDialogs [modified] Pin
toxcct13-Nov-06 6:47
toxcct13-Nov-06 6:47 
GeneralRe: 2 CFileDialogs Pin
Desmo1613-Nov-06 6:54
Desmo1613-Nov-06 6:54 
GeneralRe: 2 CFileDialogs Pin
toxcct13-Nov-06 6:55
toxcct13-Nov-06 6:55 
GeneralRe: 2 CFileDialogs Pin
Desmo1613-Nov-06 23:51
Desmo1613-Nov-06 23:51 
Questionis socket in win32 (vc++) is blocking Pin
vineeshV13-Nov-06 5:53
vineeshV13-Nov-06 5:53 
AnswerRe: is socket in win32 (vc++) is blocking Pin
James R. Twine13-Nov-06 6:08
James R. Twine13-Nov-06 6:08 
AnswerRe: is socket in win32 (vc++) is blocking Pin
Mark Salsbery13-Nov-06 6:14
Mark Salsbery13-Nov-06 6:14 
AnswerRe: is socket in win32 (vc++) is blocking Pin
vineeshV13-Nov-06 6:30
vineeshV13-Nov-06 6:30 
GeneralRe: is socket in win32 (vc++) is blocking Pin
Mark Salsbery13-Nov-06 7:06
Mark Salsbery13-Nov-06 7:06 
GeneralRe: is socket in win32 (vc++) is blocking Pin
led mike13-Nov-06 7:30
led mike13-Nov-06 7:30 
GeneralRe: is socket in win32 (vc++) is blocking Pin
Mark Salsbery13-Nov-06 7:31
Mark Salsbery13-Nov-06 7:31 
GeneralRe: is socket in win32 (vc++) is blocking Pin
vineeshV13-Nov-06 7:48
vineeshV13-Nov-06 7:48 

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.