Article ID: 140585
Article Last Modified on 10/24/2003
BOOL CMySheet::OnInitDialog()
{
// TODO: Add your specialized code here and/or call the base class
return CPropertySheet::OnInitDialog();
}
// This code shows how to resize a modeless CPropertySheet and
// add a button.
// CMySheet is derived from CPropertySheet
BOOL CMySheet::OnInitDialog()
{
CPropertySheet::OnInitDialog();
RECT rc;
GetWindowRect (&rc);
// Increase the height of the CPropertySheet by 30
rc.bottom += 30;
// Increase the width of CPropertySheet by 50
rc.right +=50;
// Resize the CPropertySheet
MoveWindow (rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top);
// Convert to client coordinates
ScreenToClient (&rc);
// m_Button is of type CButton and is a member of CMySheet
m_Button.Create ("&MyButton", WS_CHILD | WS_VISIBLE | WS_TABSTOP,
CRect (5, rc.bottom-30, 80, rc.bottom-5), this, IDC_MYBUTTON);
return TRUE;
}
Additional query words: 4.00 Windows 95
Keywords: kbpropsheet kbuidesign kbprb kbcode KB140585