|
-
July 1st, 1999, 05:35 PM
#1
property pages
I have a program that uses CProperty Pages for Tab control. Here is my initialization code:
CTrinary *pMyPropSheet;
CAlpha *pMyPage2;
CCode *pMyPage3;
pMyPropSheet = new CTrinary("Trinary");
pMyPage2 = new CAlpha;
pMyPage3 = new CCode;
pMyPropSheet->AddPage(pMyPage2);
pMyPropSheet->AddPage(pMyPage3);
pMyPropSheet->DoModal();
I want to get rid of the four buttons at the bottom, the OK, Cancel, Apply, and Help. But I have no clue how to do this. Please give me step by step instructions because I am not very experienced. Thanks.
Take a look at a pic of my program to see what I mean please. I am also trying to add a minimize button to the top bar and trying to get the default button (it's the convert to code button in the pic) to work. Please help me with any of these.
http://www.geocities.com/SiliconVall...036/helpme.jpg
-
July 2nd, 1999, 03:26 AM
#2
Re: property pages
Before the DoModal :
pMyPropSheet->m_psh.dwFlags |= PSH_NOAPPLYNOW; // No Apply Button
pMyPropSheet->m_psh.dwFlags |= ~PSH_HASHELP; // No Help Button
To remove the OK and Cancel Buttons, you should create a class CMyPropSheet which inherates from CPropertySheet,
You add the method OnInitDialog and you do
BOOL CAppliCustomizeSheet::OnInitDialog()
{
BOOL bResult = CPropertySheet::OnInitDialog();
GetDlgItem (IDOK)->ShowWindow (SW_HIDE);
GetDlgItem (IDCANCEL)->ShowWindow (SW_HIDE);
return bResult;
}
Does this help you ?
-
July 2nd, 1999, 02:58 PM
#3
Re: property pages
Of the top two lines of code, the first line works but not the second, so I still can't get rid of the help button.
-
July 2nd, 1999, 03:41 PM
#4
Re: property pages
I think you have to do the same thing in the propery page dialog.
eg.
CMainSettings::CMainSettings() : CPropertyPage(CMainSettings::IDD)
{
//{{AFX_DATA_INIT(CMainSettings)
//}}AFX_DATA_INIT
m_psp.dwFlags &= ~PSP_HASHELP;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|