属性页中有“上一步”  “下一步”(“完成”) “取消”  “帮助”  等按钮
请问如何能让其中的一些按钮看不到,我们公司的程序能把 “取消” “帮助”隐藏起来,只能
看到“上一步” “下一步”(“完成”) ,现在  “上一步” 也不要了,请问如何去掉,
我是新手,看不懂程序是怎么做的。有没有那位高手能讲一下方法或原理,谢谢。

解决方案 »

  1.   

    CPropertySheet dlgPropertySheet("Simple PropertySheet");CStylePage stylePage;
    CColorPage colorPage;
    dlgPropertySheet.AddPage(&stylePage);
    dlgPropertySheet.AddPage(&colorPage);dlgPropertySheet.m_psh.dwFlags |= PSH_NOAPPLYNOW | PSH_PROPTITLE;//这里就是你要修改的地方
    查看帮助,说的很详细
    dlgPropertySheet.m_psh.pszCaption = "Simple";
    dlgPropertySheet.m_psh.nStartPage = 1;dlgPropertySheet.DoModal();
      

  2.   

    也把这个可取的值给你贴出来,如下:
    dwFlags 
    Flags that indicate which options to use when creating the property sheet page. This member can be a combination of the following values: 
    PSH_DEFAULT 
    Uses the default meaning for all structure members. 
    PSH_HASHELP 
    Permits property sheet pages to display a Help button. You must also set the PSP_HASHELP flag in the page's PROPSHEETPAGE structure when the page is created. If any of the initial property sheet pages enable a Help button, PSH_HASHELP will be set automatically. If none of the initial pages enable a Help button, you must explicitly set PSH_HASHELP if you want to have Help buttons on any pages that might be added later. 
    PSH_HEADER 
    Version 5.80. Indicates that a header bitmap will be used with a Wizard97 wizard. You must also set the PSH_WIZARD97 flag. The header bitmap is obtained from the pszbmHeader member, unless the PSH_USEHBMHEADER flag is also set. In that case, the header bitmap is obtained from the hbmHeader member. 
    PSH_MODELESS 
    Causes the PropertySheet function to create the property sheet as a modeless dialog box instead of as a modal dialog box. When this flag is set, PropertySheet returns immediately after the dialog box is created, and the return value from PropertySheet is the window handle to the property sheet dialog box. 
    PSH_NOAPPLYNOW 
    Removes the Apply button. 
    PSH_NOCONTEXTHELP 
    Version 5.80. Removes the context-sensitive Help button ("?"), which is usually present on the caption bar of property sheets. This flag is not valid for wizards. See Property Sheets for a discussion of how to remove the caption bar help button for earlier versions of the Common Controls. 
    PSH_PROPSHEETPAGE 
    Uses the ppsp member and ignores the phpage member when creating the pages for the property sheet. 
    PSH_PROPTITLE 
    Displays the string "Properties for", followed by the string specified by the pszCaption member, in the title bar of the property sheet. 
    PSH_RTLREADING 
    Reverses the direction in which pszCaption is displayed. Normal windows display all text, including pszCaption, left-to-right (LTR). For languages such as Hebrew or Arabic that read right-to-left (RTL), a window can be mirrored and all text will be displayed RTL. If PSP_RTLREADING is set, pszCaption will instead read RTL in a normal parent window and LTR in a mirrored parent window. 
    PSH_STRETCHWATERMARK 
    Stretches the water in Microsoft® Internet Explorer 4.0-compatible Wizard97-style wizards.Note: This style flag is only included to provide backward compatibility for certain applications. Its use is not recommended, and it is only supported by Common Controls versions 4.0 and 4.01. With Common Controls version 5.80 and later, this flag is ignored.PSH_USECALLBACK 
    Calls the function specified by the pfnCallback member when initializing the property sheet defined by this structure. 
    PSH_USEHBMHEADER 
    Version 5.80. Obtains the header bitmap from the hbmHeader member instead of the pszbmHeader member. You must also set PSH_WIZARD97 and PSH_HEADER. 
    PSH_USEHBMWATERMARK 
    Version 5.80. Obtains the water bitmap from the hbmWater member instead of the pszbmWater member. You must also set PSH_WIZARD97 and PSH_WATERMARK. 
    PSH_USEHICON 
    Uses hIcon as the small icon in the title bar of the property sheet dialog box. 
    PSH_USEHPLWATERMARK 
    Version 5.80. Uses the HPALETTE structure pointed to by the hplWater member instead of the default palette to draw the water bitmap and/or header bitmap for a Wizard97 wizard. You must also set PSH_WIZARD97, and PSH_WATERMARK or PSH_HEADER. 
    PSH_USEICONID 
    Uses pszIcon as the name of the icon resource to load and use as the small icon in the title bar of the property sheet dialog box. 
    PSH_USEPAGELANG 
    Version 5.80. Specifies that the language for the property sheet will be taken from the first page's resource. 
    PSH_USEPSTARTPAGE 
    Uses the pStartPage member instead of the nStartPage member when displaying the initial page of the property sheet. 
    PSH_WATERMARK 
    Version 5.80. Specifies that a water bitmap will be used with a Wizard97 wizard. You must also set the PSH_WIZARD97 flag. The water bitmap is obtained from the pszbmWater member, unless PSH_USEHBMWATERMARK is set. In that case, the header bitmap is obtained from the hbmWater member. 
    PSH_WIZARD 
    Creates a wizard property sheet. 
    PSH_WIZARD97 
    Version 5.80. Creates a Wizard97-style property sheet that allows a header and/or water bitmap to be displayed in the background. 
    PSH_WIZARDCONTEXTHELP 
    Adds a context-sensitive Help button ("?"), which is usually absent from the caption bar of a wizard. This flag is not valid for regular property sheets. 
    PSH_WIZARDHASFINISH 
    Always displays the Finish button on the wizard. You must also set either PSH_WIZARD or PSH_WIZARD97. 
    PSH_WIZARD_LITE 
    Version 5.80. Uses the the Wizard-lite style. This style is similar in appearance to PSH_WIZARD97, but it is implemented much like PSH_WIZARD. There are few restrictions on how the pages are formatted. For instance, there are no enforced borders, and the PSH_WIZARD_LITE style does not paint the water and header bitmaps for you the way Wizard97 does.
      

  3.   

    // 隐藏 确定 帮助 取消 应用 按钮
    CWnd * pWndCalcel = GetDlgItem ( IDCANCEL ) ;
    pWndCalcel->ShowWindow ( false ) ;
    CWnd * pWndOK = GetDlgItem ( IDOK ) ;
    pWndOK->ShowWindow ( false ) ;
    CWnd * pWndHelp = GetDlgItem ( IDHELP ) ;
    pWndHelp->ShowWindow ( false ) ;
    CWnd * pWndApply = GetDlgItem ( ID_APPLY_NOW ) ;
    pWndApply->ShowWindow ( false )
      

  4.   

    同意wlzqi(wlzqi)的做法。要彻底的屏蔽上一步的话还要屏蔽键盘处理吧???在vc界面特效百例一书中有示例可参见的。。
      

  5.   

    // 隐藏 确定 帮助 取消 应用 按钮
    CWnd * pWndCalcel = GetDlgItem ( IDCANCEL ) ;
    pWndCalcel->ShowWindow ( false ) ;
    CWnd * pWndOK = GetDlgItem ( IDOK ) ;
    pWndOK->ShowWindow ( false ) ;
    CWnd * pWndHelp = GetDlgItem ( IDHELP ) ;
    pWndHelp->ShowWindow ( false ) ;
    CWnd * pWndApply = GetDlgItem ( ID_APPLY_NOW ) ;
    pWndApply->ShowWindow ( false )