Change Caption of PrtySheet
Ravi -- pakalr50@lnhdent.agw.bt.co.uk Thursday, April 11, 1996 Ravi Writes : VC++ (2.0) Windows NT (3.5) Hi, I am currently working on PropertySheet and can any body let me know whether we can change the Caption of the Property Sheet or not . If Yes how ? Thanks in advance
Erik Heuer -- erik.heuer@ks-t.no Sunday, April 14, 1996 [Mini-digest: 7 responses] At 16:16 11.04.96 GMT, Ravi wrote: > >Ravi Writes : > > VC++ (2.0) Windows NT (3.5) > >Hi, >I am currently working on PropertySheet and can any body let me know >whether we can change the >Caption of the Property Sheet or not . If Yes how ? > >Thanks in advance > > Obviously a MFC novice! I am not sure if this mailing-list is intended for Windows (and MFC) fundamentals like this, but the answer is: "use SetWindowText"! Erik Heuer, Kongsberg Simulation & Training, 3600 Kongsberg, Norway E-mail: erik.heuer@ks-t.no Phone:(+47) 32735766 Fax:(+47) 32736965 -----From: Cleve LittlefieldLook at the constructors for CPropertySheet, on of them has a caption property. -- ********************************* * * * Cleve W. Littlefield * * halfacre@intermind.net * * kurt@skylink.net * * * ********************************* -----From: beriksen@cda.com Assuming that pPropertySheet is a pointer to your property sheet, try: CString strMyPropertySheetCaption; strMyPropertySheetCaption = "Hello, world!"; pPropertySheet->SetWindowText(strMyPropertySheetCaption); Brian Eriksen CDA/Wiesenberger beriksen@cda.com PS - you can also use the CPropertySheet SetTitle() method (check the online help). -----From: "michael" You can change the caption in a property sheet by addinging the caption string to your .RC file and referencing this resource string in the constructor. For example, MYAPP.RC ----------------- STRINGTABLE DISCARDABLE BEGIN IDS_REQ "Request Documents" END MYPROPSHT.CPP ----------------------------- CMyPropSht::CMyPropSht(CWnd* pWndParent) : CPropertySheet(IDS_REQ, pWndParent) { AddPage(&m_Page1); } Michael L. Thal Data Tree Corporation voice: (619) 231-3300 fax: (619) 231-3301 -----From: JLR@ARTECH.COM.UY (Jose Lamas RЎos) Either constructor of the CPropertySheet allows you to set the caption. If you want to change it later, during DoModal() (in response to some event, or depending on the page being active), you can do it using CWnd::SetWindowText(). Example:: BOOL CYourPropertyPageDerivedClass::OnSetActive() { if (!CPropertyPage::OnSetActive()) return FALSE; // CPropertySheet::AddPage(CPropertyPage* pPage) set the m_pParentWnd // member of the page to be added to point to the property sheet // (i.e.: pPage->m_pParentWnd = this;). You can see it in dlgprop.cpp. m_pParent->SetWindowText("The caption for this page"); return TRUE; } -----From: "Greg Brewer - Ext. 4623" You can initialize the Caption of the CPropertySheet in the constructor = You can also change the caption using the SetWindowText function since a = =0D CPropertySheet is derived from CWnd. You can use GetParent to get the CWnd* of the sheet from a page or set the = =0D caption in a class derived from CPropertySheet. = Use Proportional Font: true Attachment Count: 0 -----From: Steven Youngs How about SetWindowText()? Steve.
| Вернуться в корень Архива |