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 around usage of RUNTIME_CLASS

Problem around usage of RUNTIME_CLASS

Scheduled Pinned Locked Moved C / C++ / MFC
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.
  • E Offline
    E Offline
    EiSl
    wrote on last edited by
    #1

    Hello all... I'm lost... maybe because I'm searching to deep, but anyway. My collega came to me for help, but unfortunately.. :confused: Let's take a look to this sample:

    class CMySystems{
    // Anything
    };

    class CMyDetails{
    // Anything
    };

    void xxx::SomeMethod( void )
    {
    ...
    // Sets up the (docking) TabControlBar
    m_wndMyCtrlBar.AddView("Systems", RUNTIME_CLASS(CMySystems));
    m_wndMyCtrlBar.AddView("Details", RUNTIME_CLASS(CMyDetails));
    ...
    }

    Now the problem: In the class CMySystems I want to be able to use methods from the class CMyDetails. How can I at runtime pass the 'this' pointer of the CMyDetails class to the CMySystems? Thanks in advance, EiSl

    T 1 Reply Last reply
    0
    • E EiSl

      Hello all... I'm lost... maybe because I'm searching to deep, but anyway. My collega came to me for help, but unfortunately.. :confused: Let's take a look to this sample:

      class CMySystems{
      // Anything
      };

      class CMyDetails{
      // Anything
      };

      void xxx::SomeMethod( void )
      {
      ...
      // Sets up the (docking) TabControlBar
      m_wndMyCtrlBar.AddView("Systems", RUNTIME_CLASS(CMySystems));
      m_wndMyCtrlBar.AddView("Details", RUNTIME_CLASS(CMyDetails));
      ...
      }

      Now the problem: In the class CMySystems I want to be able to use methods from the class CMyDetails. How can I at runtime pass the 'this' pointer of the CMyDetails class to the CMySystems? Thanks in advance, EiSl

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      It seems that TabControlBar creates CMySystems and CMyDetails objects for you - one of the CRuntimeClass responsibilities is creating CObject-derived objects. If your question is how to get actual object after it is created by CRuntimeClass, the answer is: you depend on TabControlBar. This class should give you access to its views; I'd expect something like TabControlBar::GetFirstView/GetNextView. Since it's 3rd party class, I can't help you futher. Tomasz Sowinski -- http://www.shooltz.com

      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