Click here to Skip to main content
15,923,006 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: VC++ EBooks Pin
G Haranadh21-Mar-07 20:24
G Haranadh21-Mar-07 20:24 
GeneralRe: VC++ EBooks Pin
ganesa moorthy22-Mar-07 3:06
ganesa moorthy22-Mar-07 3:06 
AnswerRe: VC++ EBooks Pin
Md. Mazharul Islam Khan21-Mar-07 20:30
Md. Mazharul Islam Khan21-Mar-07 20:30 
AnswerRe: VC++ EBooks Pin
Rajesh R Subramanian21-Mar-07 20:37
professionalRajesh R Subramanian21-Mar-07 20:37 
GeneralRe: VC++ EBooks Pin
G Haranadh21-Mar-07 20:45
G Haranadh21-Mar-07 20:45 
AnswerRe: VC++ EBooks Pin
Sudhir Mangla23-Mar-07 0:54
professionalSudhir Mangla23-Mar-07 0:54 
QuestionIn a form view- to add a dialogue box and a tab control with dialogue box in it Pin
megha_gharote21-Mar-07 18:08
megha_gharote21-Mar-07 18:08 
AnswerRe: In a form view- to add a dialogue box and a tab control with dialogue box in it [modified] Pin
G Haranadh21-Mar-07 20:39
G Haranadh21-Mar-07 20:39 
BOOL CBoardOptions::OnInitDialog() <br />
{<br />
	CDialog::OnInitDialog();<br />
//insert tab, create member variable in your dialog<br />
//Add items to tab.<br />
	m_tabs.InsertItem(0, _T("Polling"));<br />
	m_tabs.InsertItem(1, _T("Board"));<br />
	m_tabs.InsertItem(2, _T("Security"));<br />
	UpdateTabSelection();<br />
     return TRUE; <br />
}<br />
<br />
void CBoardOptions::OnSelchangeTabs(NMHDR* pNMHDR, LRESULT* pResult) <br />
{<br />
	UpdateTabSelection();<br />
	*pResult = 0;<br />
}<br />
<br />
void CBoardOptions::UpdateTabSelection()<br />
{<br />
	RECT rcTab, rct;int iCurrentTab;<br />
<br />
	iCurrentTab = m_tabs.GetCurSel();<br />
<br />
	m_tabs.GetClientRect(&rcTab);<br />
	m_tabs.GetItemRect(iCurrentTab, &rct);<br />
	rcTab.top += (rct.bottom - rct.top + 5);<br />
	rcTab.left += 5;<br />
	rcTab.bottom -= 5;<br />
	rcTab.right -= 5;//To your main dialog handle the tab click event in your dialog.<br />
//show your dialog as you needed.<br />
//you also search other model in code guru. <br />
<br />
	switch (iCurrentTab)<br />
	{<br />
		case 0:<br />
			m_dlgPollingOptions.ShowWindow(SW_SHOW);<br />
			m_dlgPollingOptions.MoveWindow(&rcTab);<br />
			m_dlgBoardOptions.ShowWindow(SW_HIDE);<br />
			m_dlgSecurity.ShowWindow(SW_HIDE);<br />
			break;<br />
		case 1:<br />
			m_dlgBoardOptions.ShowWindow(SW_SHOW);<br />
			m_dlgBoardOptions.MoveWindow(&rcTab);<br />
			m_dlgPollingOptions.ShowWindow(SW_HIDE);<br />
			m_dlgSecurity.ShowWindow(SW_HIDE);<br />
			break;<br />
		case 2:<br />
			m_dlgSecurity.ShowWindow(SW_SHOW);<br />
			m_dlgSecurity.MoveWindow(&rcTab);<br />
			m_dlgBoardOptions.ShowWindow(SW_HIDE);<br />
			m_dlgPollingOptions.ShowWindow(SW_HIDE);<br />
			break;<br />
	}<br />
}

I think you got it.
Here dlg represents one dialog. "Board options" is one dialog.


-- modified at 6:48 Thursday 22nd March, 2007


Nice talking to you. Blush | :O
If you judge people, you have no time to love them. -- Mother Teresa

GeneralRe: In a form view- to add a dialogue box and a tab control with dialogue box in it Pin
megha_gharote22-Mar-07 0:37
megha_gharote22-Mar-07 0:37 
GeneralRe: In a form view- to add a dialogue box and a tab control with dialogue box in it Pin
G Haranadh22-Mar-07 0:50
G Haranadh22-Mar-07 0:50 
Questionrecord file problem Pin
ppp00121-Mar-07 15:48
ppp00121-Mar-07 15:48 
QuestionMessage Removed Pin
21-Mar-07 14:57
Armond Sarkisian21-Mar-07 14:57 
AnswerRe: Transferring Program To Another Computer Pin
Mark Salsbery21-Mar-07 15:08
Mark Salsbery21-Mar-07 15:08 
AnswerRe: Transferring Program To Another Computer Pin
Michael Dunn21-Mar-07 15:40
sitebuilderMichael Dunn21-Mar-07 15:40 
AnswerRe: Transferring Program To Another Computer Pin
Paresh Chitte21-Mar-07 18:20
Paresh Chitte21-Mar-07 18:20 
QuestionMessage Removed Pin
21-Mar-07 13:30
Armond Sarkisian21-Mar-07 13:30 
AnswerRe: Switching From Debug To Release Mode Pin
Mark Salsbery21-Mar-07 13:32
Mark Salsbery21-Mar-07 13:32 
QuestionEmpty TreeCtrl with Bottom Scollbar!!! Why???? Pin
tiflo21-Mar-07 12:31
tiflo21-Mar-07 12:31 
AnswerRe: Empty TreeCtrl with Bottom Scollbar!!! Why???? Pin
Mark Salsbery21-Mar-07 13:30
Mark Salsbery21-Mar-07 13:30 
QuestionMessage Removed Pin
21-Mar-07 11:16
Armond Sarkisian21-Mar-07 11:16 
AnswerRe: Any string trimming functions? Pin
Nemanja Trifunovic21-Mar-07 11:28
Nemanja Trifunovic21-Mar-07 11:28 
AnswerRe: Any string trimming functions? Pin
PJ Arends21-Mar-07 12:47
professionalPJ Arends21-Mar-07 12:47 
Questionget netmask information when other IP address is known Pin
lucy21-Mar-07 11:05
lucy21-Mar-07 11:05 
QuestionQuestion regarding Windows SDK Pin
Vikrant for VC++21-Mar-07 8:45
Vikrant for VC++21-Mar-07 8:45 
AnswerRe: Question regarding Windows SDK Pin
Mark Salsbery21-Mar-07 9:10
Mark Salsbery21-Mar-07 9:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.