资源描述:
《MFC Feature Pack CMFCPropertyGridCtrl 控件的应用 收藏.pdf》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、MFCFeaturePackCMFCPropertyGridCtrl控件的应用收藏CMFCPropertyGridCtrlm_wndPropList;CMFCPropertyGridProperty*pGroup11;CMFCPropertyGridProperty*pGroup12;CMFCPropertyGridProperty*pGroup21;//CMFCPropertyGridPropertypGroup22;CMFCPropertyGridProperty*pGroup3;BOOLCProcessPage2::OnInitDialog(
2、){CMFCPropertyPage::OnInitDialog();//读入默认参数文件里的参数项if(!ReadCardFile()){AfxMessageBox(_T("读入默认参数文件失败!"));returnfalse;}CRectrectPropList;m_wndPropListLocation.GetClientRect(&rectPropList);m_wndPropListLocation.MapWindowPoints(this,&rectPropList);m_wndPropList.Create(WS_CHILD
3、WS_V
4、ISIBLE
5、WS_TABSTOP
6、WS_BORDER,rectPropList,this,(UINT)-1);m_wndPropList.EnableHeaderCtrl(m_bHeader,_T("属性"),_T("取值"));m_wndPropList.EnableDescriptionArea(m_bDescrArea);m_wndPropList.SetVSDotNetLook(m_bDotNetLook);m_wndPropList.MarkModifiedProperties(m_bMarkChanged);m_wndPropList
7、.SetAlphabeticMode(!m_bPropListCategorized);m_wndPropList.SetShowDragContext(m_bShowDragContext);//曲线重定向设置pGroup11=newCMFCPropertyGridProperty(_T("输入重定向"));pGroup12=newCMFCPropertyGridProperty(_T("输出重定向"));//输入重定向for(inti=0;iAddSubItem(newCMFCPropert
8、yGridProperty(strCurveInRunTimeName[i],(COleVariant)strCurveInCifFileName[i],_T("Thisisadescription"),i));}//apGroup1->AddSubItem(pGroup11);//输出重定向for(inti=0;iAddSubItem(newCMFCPropertyGridProperty(strCurveOutRunTimeName[i],(COleVariant)strCurveOutC
9、ifFileName[i],_T("Thisisadescription"),i));}//apGroup1->AddSubItem(pGroup12);//apGroup1->Expand(FALSE);m_wndPropList.AddProperty(pGroup11);m_wndPropList.AddProperty(pGroup12);//深度段pGroup21=newCMFCPropertyGridProperty(_T("处理深度段"));pGroup21->AddSubItem(newCMFCPropertyGridPropert
10、y(_T("起始深度"),strStartDepth,_T("处理起始深度")));pGroup21->AddSubItem(newCMFCPropertyGridProperty(_T("结束深度"),strEndDepth,_T("处理结束深度")));m_wndPropList.AddProperty(pGroup21);//参数选择pGroup3=newCMFCPropertyGridProperty(_T("处理参数"));for(inti=0;iAddSubItem(newCMFC
11、PropertyGridProperty(strParameterName[i],(COleVariant)strPara