problem about font
-
problem about font i write CMFont class,it inheritance CFont e.g: class CMFont:public CFont {..........}; ======================== CMFont font; font.CreateFont(...); GetDlgItem(IDC_FONTID)->SetFont(&font); error error C2664: 'CWnd::SetFont' : cannot convert parameter 1 from 'CMFont **__w64 ' to 'CFont *' how to CMFont convert CFont thank:)
-
problem about font i write CMFont class,it inheritance CFont e.g: class CMFont:public CFont {..........}; ======================== CMFont font; font.CreateFont(...); GetDlgItem(IDC_FONTID)->SetFont(&font); error error C2664: 'CWnd::SetFont' : cannot convert parameter 1 from 'CMFont **__w64 ' to 'CFont *' how to CMFont convert CFont thank:)
if you run this code what happens?
class CMyFont : public CFont { DECLARE_DYNAMIC(CMyFont) public: CMyFont(); virtual ~CMyFont(); }; ... ... IMPLEMENT_DYNAMIC(CMyFont, CFont) CMyFont::CMyFont() { } CMyFont::~CMyFont() { } CMyFont font; font.CreateFont(...); GetDlgItem(1)->SetFont(&font);
WhiteSky
-
if you run this code what happens?
class CMyFont : public CFont { DECLARE_DYNAMIC(CMyFont) public: CMyFont(); virtual ~CMyFont(); }; ... ... IMPLEMENT_DYNAMIC(CMyFont, CFont) CMyFont::CMyFont() { } CMyFont::~CMyFont() { } CMyFont font; font.CreateFont(...); GetDlgItem(1)->SetFont(&font);
WhiteSky
i am sorry,i write error...... =============New=========== problem about font i write CMFont class,it inheritance CFont e.g: class CMFont:public CFont {..........}; ************COMBOBOX*********** CMFont font; font.CreateFont(...); GetDlgItem(COMBOBOXID)->SetFont(&font); error error C2664: 'CWnd::SetFont' : cannot convert parameter 1 from 'CMFont **__w64 ' to 'CFont *' how to CMFont convert CFont thank:)
-
i am sorry,i write error...... =============New=========== problem about font i write CMFont class,it inheritance CFont e.g: class CMFont:public CFont {..........}; ************COMBOBOX*********** CMFont font; font.CreateFont(...); GetDlgItem(COMBOBOXID)->SetFont(&font); error error C2664: 'CWnd::SetFont' : cannot convert parameter 1 from 'CMFont **__w64 ' to 'CFont *' how to CMFont convert CFont thank:)
Did you test my reply and what happens it did work or no
WhiteSky