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