Add a Property Page that is already created
Rih Saad -- windrih@onpt.mci.net Saturday, March 30, 1996 Environment : W95, VC++ 4.0, MFC,FTSRCH 1) What i am trying to do is give user the same PropertySheet that WINHELP give for full search, But all i find on PropertyPage is how you create a Page from a Template resource. But the Window for Full Search is created in the FTSRCH.DLL HWND OpenDialog(HSEARCHER,HWND hParent) and i dind't figure out how to add it to a CPropertySheet. For now i'am just loading a CDialog that create the Child Dialog and resize to handle the size of the child and Buttons (Display and Cancel). Cordialement Merci Rih Saad Wind Systeme
David W. Gillett -- DGILLETT@expertedge.com Tuesday, April 02, 1996 > Environment : W95, VC++ 4.0, MFC, FTSRCH > > What i am trying to do is give user the same PropertySheet that > WINHELP give for full search, But all i find on PropertyPage is > how you create a Page from a Template resource. But the Window for > Full Search is created in the FTSRCH.DLL > HWND OpenDialog(HSEARCHER,HWND hParent) > and i didn't figure out how to add it to a CPropertySheet. For now > i'am just loading a CDialog that create the Child Dialog and > resize to handle the size of the child and Buttons (Display and > Cancel). I'm not familiar with FTSRCH and so I'm not entirely sure I understand the question, but I can think of three things to try which might help. Typically, there are two ways to link an MFC object to a Windows object. The more usual one is to construct the MFC object, and call it's Create() method to create the corresponding Windows object. Another approach, though, is to call the Attach() method to bind an MFC object to a Windows object that already exists. Perhaps you can create the dialog, hide and disable it, and Attach() it to a CPropertyPage-derived object which you can then insert in your property sheet? A second possibility is to take a look at the PROPSHEETPAGE structure (CPropertyPage::m_psp), and see if you can set its elements to refer to the FTSRCH dialog. This is less likely to work, but it might.... A third possibility is to insert a page in your sheet with a blank template (just a caption, if you use that method to set the tab text). In its OnSetActive() method, bring up the FTSRCH dialog as a child of the page, and dismiss (or at least hide) it in OnKillActive(). You may be able to get the visual effect you want, even if the dialog is not "really" a page in its own right. Dave
| Вернуться в корень Архива |