Click here to Skip to main content
15,880,392 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: HHEEELLLPPPP: global integer! Pin
berndg28-Feb-03 0:45
berndg28-Feb-03 0:45 
GeneralRe: HHEEELLLPPPP: global integer! Pin
Sunnygirl28-Feb-03 1:21
Sunnygirl28-Feb-03 1:21 
GeneralRe: HHEEELLLPPPP: global integer! Pin
berndg28-Feb-03 1:41
berndg28-Feb-03 1:41 
GeneralRe: HHEEELLLPPPP: global integer! Pin
Joan M28-Feb-03 0:48
professionalJoan M28-Feb-03 0:48 
GeneralOpenOffice - API (MailMerging) Pin
MrEyes28-Feb-03 0:02
MrEyes28-Feb-03 0:02 
GeneralRe: OpenOffice - API (MailMerging) Pin
Daniel Turini28-Feb-03 1:45
Daniel Turini28-Feb-03 1:45 
GeneralRe: OpenOffice - API (MailMerging) Pin
MrEyes28-Feb-03 6:22
MrEyes28-Feb-03 6:22 
GeneralDynamically Setting Tab Title on Propertysheet Pin
John Clump27-Feb-03 22:48
John Clump27-Feb-03 22:48 
Hi everyone. I have a dialog with a propertysheet with a tab control style. The propertysheet has 5 propertypages, all of the same class. I want each tab to have a different title on it, eg. "One", "Two", etc. Since they are all of the same class, I can't set the title statically. In the propertypage's OnInitDialog() I try to set the title, but it won't change the title on the tab. Is there a way to set the tab titles in the propertypage's OnInitDialog()? I could create 5 different dialog classes for each propertypage and could set the title statically, but that would be wasteful. I use the code below. It doesn't set the title. It also crashes when the program is in release mode, which I can't understand. Thanks for any help!

<br />
BOOL CDlgMyDialog::OnInitDialog() <br />
{<br />
	CDialog::OnInitDialog();<br />
<br />
   //...<br />
<br />
   // m_ppgMyPropPages is an array of m_ppgMyPropPage<br />
	for(i = 0; i < 5; ++i)<br />
	{<br />
		m_ppgMyPropPages[i].SetMode(i);<br />
		m_ppsMyPropSheet.AddPage(&m_ppgMyPropPage[i]);<br />
	}<br />
<br />
	// create the sheet<br />
	m_ppsMyPropSheet.Create(this, WS_CHILD | WS_VISIBLE, 0);<br />
	m_ppsMyPropSheet.ModifyStyleEx(0, WS_EX_CONTROLPARENT);<br />
	m_ppsMyPropSheet.ModifyStyle(0, WS_TABSTOP);<br />
<br />
	CRect rcSheet;<br />
	GetDlgItem(IDC_PPS_MAIN)->GetWindowRect(&rcSheet);<br />
	ScreenToClient(&rcSheet);<br />
	m_ppsMyPropSheet.SetWindowPos(NULL, rcSheet.left- 7, rcSheet.top - 7, 0, 0,<br />
		SWP_NOZORDER | SWP_NOSIZE);<br />
<br />
 //...<br />
}<br />
<br />
BOOL CPpgMyPropPage::OnInitDialog() <br />
{<br />
	CPropertyPage::OnInitDialog();<br />
	<br />
	if(m_iMode == 0)<br />
		SetWindowText("One");<br />
	if(m_iMode == 1)<br />
		SetWindowText("Two");<br />
	if(m_iMode == 2)<br />
		SetWindowText("Three");<br />
	if(m_iMode == 3)<br />
		SetWindowText.SetWindowText("Four");<br />
	if(m_iMode == 4)<br />
		SetWindowText.SetWindowText("Five");<br />
<br />
  //....<br />
<br />
}<br />

GeneralRe: Dynamically Setting Tab Title on Propertysheet Pin
Joan M27-Feb-03 23:09
professionalJoan M27-Feb-03 23:09 
GeneralRe: Dynamically Setting Tab Title on Propertysheet Pin
vikramlinux28-Feb-03 0:30
vikramlinux28-Feb-03 0:30 
GeneralSome brain storming. Pin
Tili27-Feb-03 19:49
Tili27-Feb-03 19:49 
GeneralRe: Some brain storming. Pin
Daniel Turini28-Feb-03 1:42
Daniel Turini28-Feb-03 1:42 
GeneralDrag and drop Pin
redlion321027-Feb-03 18:41
redlion321027-Feb-03 18:41 
GeneralRe: Drag and drop Pin
Michael Dunn27-Feb-03 19:07
sitebuilderMichael Dunn27-Feb-03 19:07 
GeneralRe: Drag and drop Pin
redlion321028-Feb-03 0:09
redlion321028-Feb-03 0:09 
GeneralLaunch Mail Client Pin
redlion321027-Feb-03 18:38
redlion321027-Feb-03 18:38 
GeneralRe: Launch Mail Client Pin
Michael Dunn27-Feb-03 19:10
sitebuilderMichael Dunn27-Feb-03 19:10 
GeneralRe: Launch Mail Client Pin
redlion321027-Feb-03 19:28
redlion321027-Feb-03 19:28 
GeneralRe: Launch Mail Client Pin
xxhimanshu27-Feb-03 20:00
xxhimanshu27-Feb-03 20:00 
GeneralRe: Launch Mail Client Pin
redlion321027-Feb-03 22:53
redlion321027-Feb-03 22:53 
GeneralRe: Launch Mail Client Pin
xxhimanshu27-Feb-03 19:37
xxhimanshu27-Feb-03 19:37 
GeneralRe: Launch Mail Client Pin
redlion321027-Feb-03 21:41
redlion321027-Feb-03 21:41 
GeneralRe: Launch Mail Client Pin
xxhimanshu27-Feb-03 21:58
xxhimanshu27-Feb-03 21:58 
GeneralProblem reading from ini file in windows 98 Pin
Raghunandan S27-Feb-03 16:42
Raghunandan S27-Feb-03 16:42 
GeneralRe: Problem reading from ini file in windows 98 Pin
Nish Nishant27-Feb-03 16:54
sitebuilderNish Nishant27-Feb-03 16:54 

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.