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. CTabCtrl problem

CTabCtrl problem

Scheduled Pinned Locked Moved C / C++ / MFC
oophelp
3 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.
  • S Offline
    S Offline
    Spawn Melmac
    wrote on last edited by
    #1

    Greetings, I am trying to populate a CTabCtrl in my dialog with child dialogs but I am having terrible problems with inheritance of the CWnd*. Now I assume that is what it is as the dialogs I create are spawning in their own window rather than the client window of the control. Below is snippet of my class

    CTabManage::CTabManage()
    {
    m_tab[0]=new CDetails;
    ...

    void CTabManage::Init()
    {
    m_tabActive=0;

    m\_tab\[0\]->Create(IDD\_TAB\_DETAILS, this);
    

    ...

    and here is where it is initialised

    ::OnInitDialog()
    ...
    m_cTabManage.InsertItem(0, _T("Details"));

    m\_cTabManage.Init();
    

    ...

    Any pointers would be appreciated as it has been driving me nuts.

    Alan

    N 1 Reply Last reply
    0
    • S Spawn Melmac

      Greetings, I am trying to populate a CTabCtrl in my dialog with child dialogs but I am having terrible problems with inheritance of the CWnd*. Now I assume that is what it is as the dialogs I create are spawning in their own window rather than the client window of the control. Below is snippet of my class

      CTabManage::CTabManage()
      {
      m_tab[0]=new CDetails;
      ...

      void CTabManage::Init()
      {
      m_tabActive=0;

      m\_tab\[0\]->Create(IDD\_TAB\_DETAILS, this);
      

      ...

      and here is where it is initialised

      ::OnInitDialog()
      ...
      m_cTabManage.InsertItem(0, _T("Details"));

      m\_cTabManage.Init();
      

      ...

      Any pointers would be appreciated as it has been driving me nuts.

      Alan

      N Offline
      N Offline
      Niklas L
      wrote on last edited by
      #2

      Is the WS_CHILD set for you child dialogs? In the resource properties for your dialogs make sure Style=Child, and you probably would like Control=True as well.

      home

      S 1 Reply Last reply
      0
      • N Niklas L

        Is the WS_CHILD set for you child dialogs? In the resource properties for your dialogs make sure Style=Child, and you probably would like Control=True as well.

        home

        S Offline
        S Offline
        Spawn Melmac
        wrote on last edited by
        #3

        Thank you. That got it. That was the one thing I had not checked.

        Alan

        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