Click here to Skip to main content
15,917,731 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Permanent vs. Temporary DC's? Pin
Neville Franks11-Oct-02 12:41
Neville Franks11-Oct-02 12:41 
GeneralRe: Permanent vs. Temporary DC's? Pin
Henry P.11-Oct-02 12:55
Henry P.11-Oct-02 12:55 
GeneralRe: Permanent vs. Temporary DC's? Pin
Neville Franks11-Oct-02 13:13
Neville Franks11-Oct-02 13:13 
AnswerRe: Permanent vs. Temporary DC's? Pin
Paul M Watt11-Oct-02 14:31
mentorPaul M Watt11-Oct-02 14:31 
GeneralRe: Permanent vs. Temporary DC's? Pin
Henry P.11-Oct-02 15:05
Henry P.11-Oct-02 15:05 
GeneralRe: Permanent vs. Temporary DC's? Pin
Gary R. Wheeler11-Oct-02 16:02
Gary R. Wheeler11-Oct-02 16:02 
QuestionCFormView derived class w/o relying on the resource.h? Pin
dazinith11-Oct-02 10:31
dazinith11-Oct-02 10:31 
AnswerRe: CFormView derived class w/o relying on the resource.h? Pin
Chris Richardson11-Oct-02 11:26
Chris Richardson11-Oct-02 11:26 
One solution (assumes CYourFormView is your CFormView derived class):

1. Take out the "enum { IDD = IDD_DISPLAY };" from the CYourFormView.
2. Change the constructor of CYourFormView to accept a resource ID, and to not pass IDD into the CFormView constructor, but rather, pass in the value you get in CYourFormView's constructor.
3. In each .exe that uses CYourFormView, change the base initializer to pass in the appropriate resource ID to CYourFormView.

It could be something like this:

// CYourFormView header
class CYourFormView : public CFormView
{
public:
   CYourFormView( UINT p_uiTitleID );
   CYourFormView( LPCTSTR p_pszTitle );
   // Blah blah blah...
};
 
// CYourFormView implementation.
CYourFormView::CYourFormView( UINT p_uiTitleID ) :
   CFormView( p_uiTitleID ) // Not sure of the rest of the params...
{
   // Blah blah blah...
}
CYourFormView::CYourFormView( LPCTSTR p_pszTitle ) :
   CFormView( p_pszTitle ) // Not sure of the rest of the params...
{
   // Blah blah blah...
}

 
// In the header for each CYourFormView derived class
class CYourMoreSpecialFormView : public CYourFormView
{
public:
   CYourMoreSpecialFormView();
   // Blah blah blah...
 
   enum { IDD = IDD_WHATEVER_YOU_WANT_IT_TO_BE };
};
 
// In the implementation for each CYourFormView derived class
CYourMoreSpecialFormView::CYourMoreSpecialFormView() :
   CYourFormView( IDD )
{
   // Blah blah blah
}



I hope I have been clear enough. If not, I can try to explain better.

Chris Richardson
Generalstd::vector question Pin
Rene De La Garza11-Oct-02 10:27
Rene De La Garza11-Oct-02 10:27 
GeneralRe: std::vector question Pin
Maximilien11-Oct-02 10:33
Maximilien11-Oct-02 10:33 
GeneralRe: std::vector question Pin
Daniel Turini11-Oct-02 10:31
Daniel Turini11-Oct-02 10:31 
GeneralCfg File Reading Pin
Anonymous11-Oct-02 10:26
Anonymous11-Oct-02 10:26 
GeneralRe: Cfg File Reading Pin
Maximilien11-Oct-02 10:31
Maximilien11-Oct-02 10:31 
GeneralRe: Cfg File Reading Pin
Anonymous11-Oct-02 10:41
Anonymous11-Oct-02 10:41 
GeneralTrying to findout Drive type from OS Path Pin
Xeena11-Oct-02 10:12
Xeena11-Oct-02 10:12 
GeneralRe: Trying to findout Drive type from OS Path Pin
Mike Nordell12-Oct-02 6:03
Mike Nordell12-Oct-02 6:03 
Generalrecordset ADO for an empty database Pin
ns11-Oct-02 10:15
ns11-Oct-02 10:15 
GeneralRe: recordset ADO for an empty database Pin
John M. Drescher11-Oct-02 10:25
John M. Drescher11-Oct-02 10:25 
GeneralRe: recordset ADO for an empty database Pin
Rene De La Garza11-Oct-02 10:24
Rene De La Garza11-Oct-02 10:24 
GeneralProblems with MRU Files Pin
José Luis Sogorb11-Oct-02 8:50
José Luis Sogorb11-Oct-02 8:50 
GeneralSendmessage Pin
Anthony988711-Oct-02 8:06
Anthony988711-Oct-02 8:06 
GeneralRe: Sendmessage Pin
Nick Parker11-Oct-02 8:34
protectorNick Parker11-Oct-02 8:34 
GeneralRe: Sendmessage Pin
valikac11-Oct-02 15:18
valikac11-Oct-02 15:18 
GeneralRe: Sendmessage Pin
Michael Dunn11-Oct-02 16:17
sitebuilderMichael Dunn11-Oct-02 16:17 
QuestionHow to get the Error Pin
Gaurika Wijeratne11-Oct-02 7:49
Gaurika Wijeratne11-Oct-02 7:49 

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.