zenogais
July 30th, 2004, 04:52
Can anyone help me with these, I can get the tabs and stuff to appear on screen, but I want to add edit controls to the dialog. All I know is that these things seem way too hard and I still haven't found a decent solution, so I must be doing something wrong. This is what I've got so far, any help is greatly appreciated:
BOOL BugCatcherMain::OnInitDialog()
{
//======================================== ==================================
// Initialize Dialog And Set The Window Name To The Version String
//======================================== ==================================
CDialog::OnInitDialog();
SetWindowText(m_strVersion.c_str());
//======================================== ==================================
// Create CTabCtrl Instance And Add Tabs To This Control
//======================================== ==================================
CRect rect;
GetClientRect(&rect);
m_tabManager.Create(TCS_TABS | WS_VISIBLE, rect, this, IDC_TAB1);
PSTR tabNames[] = {
"General Log",
"Error Log",
NULL
};
TC_ITEM item;
for(int i = 0; tabNames[i] != NULL; i++)
{
item.mask = TCIF_TEXT;
item.pszText = tabNames[i];
item.cchTextMax = (int)strlen(tabNames[i]);
m_tabManager.InsertItem(i, &item);
}
m_tabManager.BringWindowToTop();
m_tabManager.SetCurSel(0);
return TRUE;
}
smcd
July 30th, 2004, 06:11
Yeah I've not figured out tab controls well either, but I don't use MFC so you're out of luck here.
zenogais
July 30th, 2004, 20:47
Yeah I've not figured out tab controls well either, but I don't use MFC so you're out of luck here.
No problem, I think I'm just gonna try something different.
smcd
July 30th, 2004, 22:46
Hmm, this might help?
http://www.viksoe.dk/code/tabdlg.htm
Or the MFC example named "Fire" that should have come with VC++6 demonstrates a tab control with elements inside it.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample/html/_sample_mfc_FIRE.asp
vBulletin v3.6.2, Copyright ©2000-2010, Jelsoft Enterprises Ltd.