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. Tab control - the big fight

Tab control - the big fight

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

    Hi, I am fighting with tab control. I can not show a dialog from resource on a tab control. I don't use MFC. I have two dialogs main with tab control and second: ///definition of my second dialog from resource file IDD_LOADPROFILE DIALOGEX 0, 0, 87, 46 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT on this message I am trying to show second dialog case WM_INITDIALOG: TCITEM tc; tc.mask = TCIF_TEXT | TCIF_PARAM; tc.pszText = "Current setting"; tc.lParam = IDD_LOADPROFILE;/// this is ID from my resource SendDlgItemMessage(hDlg,IDC_TAB1,TCM_INSERTITEM,0,(LPARAM)&tc); I see only the tab with label "Current settings", but I dont see second dialog. Thank you very much.

    J 1 Reply Last reply
    0
    • D daavena

      Hi, I am fighting with tab control. I can not show a dialog from resource on a tab control. I don't use MFC. I have two dialogs main with tab control and second: ///definition of my second dialog from resource file IDD_LOADPROFILE DIALOGEX 0, 0, 87, 46 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT on this message I am trying to show second dialog case WM_INITDIALOG: TCITEM tc; tc.mask = TCIF_TEXT | TCIF_PARAM; tc.pszText = "Current setting"; tc.lParam = IDD_LOADPROFILE;/// this is ID from my resource SendDlgItemMessage(hDlg,IDC_TAB1,TCM_INSERTITEM,0,(LPARAM)&tc); I see only the tab with label "Current settings", but I dont see second dialog. Thank you very much.

      J Offline
      J Offline
      Jonathan Davies
      wrote on last edited by
      #2

      I load a dialog from resource onto a WTL tab control. My dialog is:

      IDD_STACKERSTATUS DIALOGEX 0, 0, 589, 442
      STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE
      EXSTYLE WS_EX_CLIENTEDGE

      Loading of the dialog onto a tab I use:

      m_tabView.Create(m_tPane.m_hWnd, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, WS_EX_CLIENTEDGE);

      /// Create <n> dialog based windows to use as tabbed views
      m_StackerStatusDlg.Create(m_tabView.m_hWnd,rcDefault, NULL);

      /// Add the dialog based windows to the tab controls list (seems like a map with name/window pairs)
      m_tabView.AddPage(m_StackerStatusDlg.m_hWnd, _T("Stacker Drive"));

      Hope this is of some help.

      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