2012年12月28日 星期五

How to create CMFCPropertySheet


1. First, "Project" -> "Class Wizard.."->"Add Class" --> Select "CPropertyPage".  If you select "CMFCPropertyPage", it will get error, when you run it.
2.After class was created,  we replace all "CPropertyPage" by "CMFCPropertyPage".
3. Add CMFCPropertySheet class.  And add the code.
CMySheet.h
public:
CMySheet();
virtual ~CMySheet();
CMyPage m_page1;
CMySheet.cpp
CMySheet::CMySheet()
{
AddPage(&m_page1);
}
4.
        //Cf9Dlg dlg;
CMySheet dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();

-----------------------
1. The first step, we can check http://msdn.microsoft.com/en-us/library/bb981937.aspx about the MSDN CMFCCpropertySheet Class information (Remarks).

2. We can try to find the information in the http://support.microsoft.com/kb/325613/en-us to know how to add the CPropertySheet and CPropertyPage.

3. There is the http://blog.163.com/xu_chao2000/blog/static/277706102010430338431/ for the CMFCPropertySheet and CMFCPropertyPage.  You will need to create new DIALOG resource to add "CPropertyPage" base class, because the Visual studio has the problem to use "CMFCPropertyPage" as the base class.  After add OK, then change it to "CMFCPropertyPage".

4. More information about CMFCPropertySheet -- http://blog.csdn.net/tory75034/article/details/5404061


沒有留言:

張貼留言