zoukankan      html  css  js  c++  java
  • MFCProperty

    创建: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 ;

    }

  • 相关阅读:
    day54——Python 处理图片
    day53——Python 处理 Excel 数据
    day52——Python 处理附件
    day51——爬虫(一)
    大数据治理体系简谈
    redis环境的安装
    微服务体系操作日志如何记录?
    mysql数据库设计规范
    win系统下git代码批量克隆,批量更新
    java实现二维码登录功能
  • 原文地址:https://www.cnblogs.com/ahuo/p/3021076.html
Copyright © 2011-2022 走看看