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. What am I Doing? class < class > ???

What am I Doing? class < class > ???

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
3 Posts 3 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.
  • J Offline
    J Offline
    Joschwenk666
    wrote on last edited by
    #1

    Hallo Code Project Members, I`m Using Visual C++ 6 with Prof-Uis. From Prof-Uis tutorials I declared a class like this:

    class CMyClass : public CExtNCW < CExtResizableDialog >

    It works fine, but I don`t know what I`m doing. Why do I derive CMyClass from 2 classes? What is the difference between

    public CExtResizableDialog

    and

    public CExtNCW < CExtResizableDialog >

    Because I don`t know what this kind of Deriving is called, it is difficult to find tutorials about it.. Thank you for your answers!

    _ C 2 Replies Last reply
    0
    • J Joschwenk666

      Hallo Code Project Members, I`m Using Visual C++ 6 with Prof-Uis. From Prof-Uis tutorials I declared a class like this:

      class CMyClass : public CExtNCW < CExtResizableDialog >

      It works fine, but I don`t know what I`m doing. Why do I derive CMyClass from 2 classes? What is the difference between

      public CExtResizableDialog

      and

      public CExtNCW < CExtResizableDialog >

      Because I don`t know what this kind of Deriving is called, it is difficult to find tutorials about it.. Thank you for your answers!

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      CExtNCW is a template class. Read more about it here - C++ Class Templates[^] There are several template libraries available like ATL, STL etc.

      «_Superman_» I love work. It gives me something to do between weekends.
      Microsoft MVP (Visual C++)

      1 Reply Last reply
      0
      • J Joschwenk666

        Hallo Code Project Members, I`m Using Visual C++ 6 with Prof-Uis. From Prof-Uis tutorials I declared a class like this:

        class CMyClass : public CExtNCW < CExtResizableDialog >

        It works fine, but I don`t know what I`m doing. Why do I derive CMyClass from 2 classes? What is the difference between

        public CExtResizableDialog

        and

        public CExtNCW < CExtResizableDialog >

        Because I don`t know what this kind of Deriving is called, it is difficult to find tutorials about it.. Thank you for your answers!

        C Offline
        C Offline
        Cedric Moonen
        wrote on last edited by
        #3

        CExtNCW is a template class and CExtResizableDialog is the template parameter. You are only inheriting from one class (the CExtNCW class) but as this class is a template class, you have to specify it's template parameter. I suggest you google for templates in C++ because you first need to understand how it works before being able to understand what the code means.

        Cédric Moonen Software developer
        Charting control [v2.0] OpenGL game tutorial in C++

        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