请问有谁能把属性表的那个可恶的“ 帮助”按钮去掉

解决方案 »

  1.   

    CStitchSheet::CStitchSheet(CWnd* pWndParent)
     : CPropertySheet(IDS_XXX_DEFAULT, pWndParent), 
    {
    //-1. Remove the Apply Button, Help Button;
    m_psh.dwFlags |= PSH_NOAPPLYNOW;
    m_psh.dwFlags &= ~PSH_HASHELP;
    ...
    }
      

  2.   

    这样不行, HELP 按钮还在
      

  3.   

    还有个地方,Sheet和Page中都要加入。
      

  4.   

    CMyPropertyPage1::CMyPropertyPage1() : CPropertyPage(CMyPropertyPage1::IDD)
    {
    //{{AFX_DATA_INIT(CMyPropertyPage1)
    //}}AFX_DATA_INIT
    m_psp.dwFlags &= ~PSP_HASHELP; //去掉属性页的“帮助”按钮
    }
    每一个页面都要加。
      

  5.   

    我在CMyPropertySheet::OnInitDialog()中添加了如下代碼,不僅可以去掉HELP,還變更了按鈕佈局,使得整個屬性頁更加協調! CWnd * pHelpWnd = GetDlgItem(IDHELP);
    if( pHelpWnd != NULL )
    {
    pHelpWnd->ShowWindow(SW_HIDE);
    // move the IDCANCEL button to IDHELP button position.
            {
                CWnd * pWnd1 = GetDlgItem(IDHELP);
                CWnd * pWnd2 = GetDlgItem(IDCANCEL);
                
                RECT r1,r2;
                pWnd1->GetWindowRect(&r1);
                pWnd2->MoveWindow(&r1);
                
                pWnd1->GetClientRect(&r2);
                pWnd2->GetWindowRect(&r2);
                
                RECT r3;            
                int cx, cy;
                
                cy = r2.top - r1.top;
                cx = r2.left - r1.left;
                r3.top = r1.top - cy;
                r3.bottom = r1.bottom - cy;
                r3.left = r1.left - cx;
                r3.right= r1.right- cx;
                
                pWnd2->MoveWindow(&r3);
            }
    }
      

  6.   


    pWnd2->MoveWindow(&r3);
    之后加上:
    pWnd1->ShowWindow(SW_HIDE);
    会更好
      

  7.   

    TO Areslee(易水) :
    我在最上面一層中已經加了!
    pHelpWnd->ShowWindow(SW_HIDE);
      

  8.   

    this will help uWhen the property sheet shows up, by default it has the Apply button visible and disabled. Often, we don't need the Apply button at all. Removing the button is a one liner and here's how. After you create the property sheet object just add the PSH_NOAPPLYNOW flag. 
    propsheet.m_psh.dwFlags |= PSH_NOAPPLYNOW;