Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. problem about font

problem about font

Scheduled Pinned Locked Moved C / C++ / MFC
helpcomooptutorial
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rxgmoral
    wrote on last edited by
    #1

    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:)

    Blog: http://360.yahoo.com/rxgmoral

    H 1 Reply Last reply
    0
    • R rxgmoral

      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:)

      Blog: http://360.yahoo.com/rxgmoral

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      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


      R 1 Reply Last reply
      0
      • H Hamid Taebi

        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


        R Offline
        R Offline
        rxgmoral
        wrote on last edited by
        #3

        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:)

        Blog: http://360.yahoo.com/rxgmoral

        H 1 Reply Last reply
        0
        • R rxgmoral

          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:)

          Blog: http://360.yahoo.com/rxgmoral

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          Did you test my reply and what happens it did work or no


          WhiteSky


          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups