Click here to Skip to main content
16,006,440 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerVC6 & Intel C++ 64bit compiler Pin
Ravi Bhavnani20-Feb-02 4:53
professionalRavi Bhavnani20-Feb-02 4:53 
GeneralMyAtlCtrlInstace->PassMetafile(hMyMetafile) ( VT_METAFILE) Pin
Braulio Dez20-Feb-02 3:48
Braulio Dez20-Feb-02 3:48 
GeneralRe: MyAtlCtrlInstace->PassMetafile(hMyMetafile) ( VT_METAFILE) Pin
Mazdak20-Feb-02 4:02
Mazdak20-Feb-02 4:02 
GeneralRe: MyAtlCtrlInstace->PassMetafile(hMyMetafile) ( VT_METAFILE) Pin
Braulio Dez20-Feb-02 4:09
Braulio Dez20-Feb-02 4:09 
GeneralRe: MyAtlCtrlInstace->PassMetafile(hMyMetafile) ( VT_METAFILE) Pin
Mazdak20-Feb-02 4:32
Mazdak20-Feb-02 4:32 
GeneralProblems with inheritance Pin
20-Feb-02 3:22
suss20-Feb-02 3:22 
GeneralRe: Problems with inheritance Pin
Joaquín M López Muñoz20-Feb-02 3:25
Joaquín M López Muñoz20-Feb-02 3:25 
GeneralRe: Problems with inheritance Pin
Stan Shannon20-Feb-02 4:10
Stan Shannon20-Feb-02 4:10 
IMHO, the *real* problem you have here is trying to use a "CMyClass" polymorphically as a CWnd. Why? This does not make a lot of sense. A CWnd is *not* a CMyClass. Trying to cast your way out of that situation is not a good idea. Are there going to be other types of CWnd's muliply inherited from CMyClass? If so, are some of them not CDialogs? For example, do you plan on passing in a CView that also inherits from CMyClass? If that is your goal, than I would seriously suggest you reconsider your design.

If not, than I would suggest getting rid of the attempt at polymorphism based upon CWnd. If you have a set of dialogs that need this polymorphic behavior than you should base your polymorphic behavior on that class.

i.e.

Init( CMyDialog* pmydlg )
{
pmydlg->DoSomething();
}

Since a CMyDialog *is* a CMyClass this is straight forward...

I think you are going to get yourself into a lot of trouble trying to do things the way you are.



"Thank you, thank you very much" Elvis.
GeneralMDI application Pin
20-Feb-02 1:51
suss20-Feb-02 1:51 
GeneralRe: MDI application Pin
Jonathan Craig20-Feb-02 3:12
Jonathan Craig20-Feb-02 3:12 
General24 errors Pin
-Dy20-Feb-02 0:48
-Dy20-Feb-02 0:48 
GeneralRe: 24 errors Pin
Roger Allen20-Feb-02 1:22
Roger Allen20-Feb-02 1:22 
GeneralRe: 24 errors Pin
-Dy20-Feb-02 1:51
-Dy20-Feb-02 1:51 
GeneralRe: 24 errors Pin
Sef Tarbell20-Feb-02 10:23
Sef Tarbell20-Feb-02 10:23 
GeneralHour Glass Pin
AJ12320-Feb-02 0:44
AJ12320-Feb-02 0:44 
Generalconverting a class to a reusable compiled object Pin
Kuniva20-Feb-02 0:44
Kuniva20-Feb-02 0:44 
GeneralRe: converting a class to a reusable compiled object Pin
Jon Hulatt20-Feb-02 0:56
Jon Hulatt20-Feb-02 0:56 
GeneralRe: converting a class to a reusable compiled object Pin
Joaquín M López Muñoz20-Feb-02 2:12
Joaquín M López Muñoz20-Feb-02 2:12 
QuestionHow Do I Detect Activity In a CEdit Control ? Pin
MJ_Karas20-Feb-02 0:37
MJ_Karas20-Feb-02 0:37 
AnswerRe: How Do I Detect Activity In a CEdit Control ? Pin
Jon Hulatt20-Feb-02 0:58
Jon Hulatt20-Feb-02 0:58 
GeneralRe: How Do I Detect Activity In a CEdit Control ? Pin
MJ_Karas20-Feb-02 16:03
MJ_Karas20-Feb-02 16:03 
GeneralDriverName Pin
19-Feb-02 23:50
suss19-Feb-02 23:50 
Questionhow do I Change the Font size of DrawText? Pin
John Cruz19-Feb-02 23:35
John Cruz19-Feb-02 23:35 
AnswerRe: how do I Change the Font size of DrawText? Pin
Roger Allen19-Feb-02 23:42
Roger Allen19-Feb-02 23:42 
GeneralATL IDataObject Pin
Braulio Dez19-Feb-02 23:36
Braulio Dez19-Feb-02 23:36 

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.