不知道怎么动态改属性页的标题,
我不知道怎样拦截属性页里面的控件的双击消息,我在这个控件的双击消息里面放了
一个AfxMessageBox,结果没用(属性页里面只有这一个控件),
该怎么办呢?多谢!

解决方案 »

  1.   

    设置属性页标题很容易啊,在定义的时候就可以设置啊:CMyPropertySheet PropSheet("你的标题 ");
      

  2.   

    不好意思,我说的是属性页,不是属性表,
    属性表sheet里面有好几个属性页page
      

  3.   

    在属性页类里,在需要修改标题时用下面这句代码:
    GetParent()->SetWindowText("你的标题");
      

  4.   

    zhaolaoxin() 的方法执行后没反应,
    属性表sheet里面有好几个属性页page,每个page有自己的对话框标题,
    比如在资源管理器里面载某个文件夹上右键选属性,他弹出的对话框里面有时就有"常规","共享",我想改的就是这个标题
      

  5.   

    CPropertyPage::CPropertyPage
    CPropertyPage( );CPropertyPage( UINT nIDTemplate, UINT nIDCaption = 0 );CPropertyPage( LPCTSTR lpszTemplateName, UINT nIDCaption = 0 );ParametersnIDTemplateID of the template used for this page.nIDCaptionID of the name to be placed in the tab for this page. If 0, the name will be taken from the dialog template for this page.lpszTemplateNamePoints to a string containing the name of the template for this page. Cannot be NULL.
      

  6.   

    非常感谢wade_vc(我命由我不由天) ,我明白了,不过怎么把一个CString转到Unit里面去呢?晚点给分
      

  7.   

    非常感谢wade_vc(我命由我不由天),我明白了
    还想再问一下如何把CString放到UINT nIDCaption里面去呢?
    晚点一定给分
      

  8.   

    wade_vc(我命由我不由天)的做法是不对的!这样这能设置静态的属性页标题!
    而你的问题是如何动态地设置标题!
    具体的做法是:
    void CPropView::OnLButtonDblClk(UINT nFlags, CPoint point) 
    {
    // TODO: Add your message handler code here and/or call default
    CFontSheet dlg("Test the font property sheet!");
    //CFontSheet dlg;
    //设置属性页的标题
    CString strFontPage;
    strFontPage.Format("Font (%d,%d)",point.x,point.y);
    dlg.GetPage(0)->m_psp.pszTitle=strFontPage;
    dlg.GetPage(0)->m_psp.dwFlags|=PSP_USETITLE;
    CString strEffectPage;
    strEffectPage.Format("Effect (%d,%d)",point.x+10,point.y+10);
    dlg.GetPage(1)->m_psp.pszTitle=strEffectPage;
    dlg.GetPage(1)->m_psp.dwFlags|=PSP_USETITLE; CString strColorPage;
    strColorPage.Format("Color (%d,%d)",point.x+20,point.y+20);
    dlg.GetPage(2)->m_psp.pszTitle=strColorPage;
    dlg.GetPage(2)->m_psp.dwFlags|=PSP_USETITLE; dlg.DoModal();
    CView::OnLButtonDblClk(nFlags, point);
    }
      

  9.   

    下面是我以前回答的帖子对你有一定的帮助!
    http://www.csdn.net/expert/topic/977/977701.xml?temp=.2288629