Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tab Control question

Status
Not open for further replies.

nbgoku

Programmer
May 25, 2004
108
US
for .cpp
Code:
BOOL CtabDlg::OnInitDialog()
{
	CDialog::OnInitDialog();
    //............
    // TODO: Add extra initialization here
	TC_ITEM TabCtrlItem;
	TabCtrlItem.mask = TCIF_TEXT;
	TabCtrlItem.pszText = "2DFBP";
	m_Color.InsertItem( 0, &TabCtrlItem );
	TabCtrlItem.pszText = "";
	m_Color.InsertItem( 1, &TabCtrlItem );
	return TRUE;
}

void CtabDlg::OnTcnSelchangeTab1(NMHDR *pNMHDR, LRESULT *pResult)
{
	// TODO: Add your control notification handler code here
	*pResult = 0;
}
for .h
Code:
class CtabDlg : public CDialog
{
//..................
public:
	afx_msg void OnTcnSelchangeTab1(NMHDR *pNMHDR, LRESULT *pResult);
	CTabCtrl m_Color;
};

i want to put a radio button in 1 tab, and a edit box under another, how do i do this? how do i get them to hide/appear when a certain tab is selected?

 
also in the .cpp

Code:
void CtabDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_TAB1, m_Color);
}
 
nbgoku,

Take a look at my last post "Tab Control Adding Items"


It might take a little bit if you are new to it like I am but you can get it working.

-Ron

/**************
Me: When will the project be finished?
Them: What project?
Me: The one you have been working on for the last 3 years!
Them: Ohh, we can't finish it?
Me: Why?
Them: We don't know how to program...
 
WAIT WAIT WAIT I GOT IT!! HAHAHAHA NVM NVM THIS POST CAN BE DELETED!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top