CMFCPropertyGridCtrl 使用简记
2010-12-12 23:37
429 查看
CMFCPropertyGridCtrl 使用简记
CMFCPropertyGridCtrl vc2008 新增加类使用方法: 创建:CMFCPropertyGridCtrl m_wndPropList ; CRect rectDummy; rectDummy.SetRectEmpty (); if (!m_wndPropList .Create (WS_VISIBLE | WS_CHILD, rectDummy, this, 1)) { TRACE0("Failed to create Properies Grid /n"); return -1; // fail to create } m_wndPropList.EnableHeaderCtrl (FALSE);//标头 m_wndPropList.EnableDescriptionArea ();// m_wndPropList.SetVSDotNetLook ();// 增加项: CMFCPropertyGridProperty* pMDITabsProp = new CMFCPropertyGridProperty (_T("Enable MDI Tabs"), lpszMDITabsStyles [1], _T("Enable or disable either the standard MDI Tabs feature, or MDI Tabbed Groups feature"), idShowMDITabs); pMDITabsProp->AddOption (_T ("None")); pMDITabsProp->AddOption (_T ("MDI Tabs (Standard)")); pMDITabsProp->AddOption (_T ("MDI Tabbed Groups")); m_wndPropList.AddProperty (pMDITabsProp); 得到一项值: CMFCPropertyGridProperty* m_pro = m_wndPropList ->GetProperty( int nIndex ) ; CString str = m_pro ->GetValue(); 回调方法: afx_msg LRESULT OnPropertyChanged (WPARAM,LPARAM); ON_REGISTERED_MESSAGE(AFX_WM_PROPERTY_CHANGED, OnPropertyChanged) LRESULT CWorkspaceBar::OnPropertyChanged (WPARAM,LPARAM lParam) { CMFCPropertyGridProperty* pProp = (CMFCPropertyGridProperty*) lParam; BOOL bResetMDIChild = FALSE; switch ((int) pProp->GetData ()) { case :pProp->GetValue(); break ; } } http://qzone.qq.com/blog/4666942-1230445980 |
相关文章推荐
- CMFCPropertyGridCtrl 使用简记
- CMFCPropertyGridCtrl 使用简记
- CMFCPropertyGridCtrl 使用简记
- CMFCPropertyGridCtrl 使用简记
- VS2008下使用 CMFCPropertyGridCtrl 转载
- MFC CMFCPropertyGridCtrl控件使用问题:刷新后底部出现黑边
- CMFCPropertyGridCtrl的使用
- 使用CMFCPropertyGridCtrl及CMFCPropertyGridProperty控件的心得体会
- 属性窗口开发--CMFCPropertyGridCtrl的使用
- C++ 关于 CMFCPropertyGridCtrl 的使用方法 之二 (原创)
- C++ 关于 CMFCPropertyGridCtrl 的使用方法 之一 (原创)
- C++ 关于 CMFCPropertyGridCtrl 的使用方法
- CMFCPropertyGrid Control的使用
- CMFCPropertyGridCtrl: How to Validate and Update Data?
- MFC Feature Pack CMFCPropertyGridCtrl 控件的例子
- 关于CMFCPropertyGridProperty 选件类的使用
- Accelerators processing before CMFCPropertyGridCtrl
- CMFCPropertyGridCtrl: How to Validate and Update Data?
- MFC Feature Pack CMFCPropertyGridCtrl控件的应用
- CMFCPropertyGridCtrl的简单教程 推荐