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. MFC CDialog Inheritance

MFC CDialog Inheritance

Scheduled Pinned Locked Moved C / C++ / MFC
c++oophelp
2 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.
  • M Offline
    M Offline
    Mythago
    wrote on last edited by
    #1

    In MFC CDialog is inherited publically from CWnd and in CWnd there is a Create function that takes 7 parameters ( the last one of which has a default value ). Now surely you should be able to use this function within your derived CDialog class, but Visual C++ will not compile the code saying "error C2661: 'Create' : no overloaded function takes 7 parameters" This is not important, I'm just curious.

    R 1 Reply Last reply
    0
    • M Mythago

      In MFC CDialog is inherited publically from CWnd and in CWnd there is a Create function that takes 7 parameters ( the last one of which has a default value ). Now surely you should be able to use this function within your derived CDialog class, but Visual C++ will not compile the code saying "error C2661: 'Create' : no overloaded function takes 7 parameters" This is not important, I'm just curious.

      R Offline
      R Offline
      Robert A T Kaldy
      wrote on last edited by
      #2

      If the CWnd::Create function is overridden in CDialog, you can in CDialog and derived classes use only the overridden versions. To force the non-overridden CWnd::Create call, use CDerivedDialog dlg; dlg.CWnd::Create(...); Robert-Antonio "A flower walked around a meadow. She saw a beatiful human and plucked off his head."

      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