Help with CPropertySheets!

This is a discussion on Help with CPropertySheets! within the Windows Programming forums, part of the Platform Specific Boards category; Hey guys, I have everything working just fine my only issue is those nagging IDOK and IDCANCEL buttons at the ...

  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    2

    Help with CPropertySheets!

    Hey guys,
    I have everything working just fine my only issue is those nagging IDOK and IDCANCEL buttons at the bottom. There is some stupid MFC way to do it, but I don't use VC++!! I have tried several methods of getting the HWND of the buttons in the Dialog callback and ShowWindow()'ing them to SW_HIDE. It doesn't work and I know I'm doing it right cause I tested SW_HIDE'ing my own resources.

    Basically, I need a way to remove/rename/move the OK and Cancel buttons at the bottom of a CPropertySheet without MFC.

    Thank you.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Windows specific so moved to Windows Board.

    >>I have tried several methods of getting the HWND<<

    What exactly have you tried? Without specifying you'll just get suggestions that you've no doubt already tried, such as enumerating the windows.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    213
    But if its a CPropertySheet it is MFC.

    In MFC its done like this :

    Code:
        // this hides the Apply button
        CWnd* pApplyButton = GetDlgItem (ID_APPLY_NOW);
        ASSERT (pApplyButton);
        pApplyButton->ShowWindow (SW_HIDE);
    Last edited by DaveH; 02-21-2008 at 08:30 AM.

  4. #4
    Registered User
    Join Date
    Feb 2008
    Posts
    2
    Quote Originally Posted by DaveH View Post
    But if its a CPropertySheet it is MFC.

    In MFC its done like this :

    Code:
        // this hides the Apply button
        CWnd* pApplyButton = GetDlgItem (ID_APPLY_NOW);
        ASSERT (pApplyButton);
        pApplyButton->ShowWindow (SW_HIDE);
    Clearly you did not read my post. I am not using MFC at all. PropertySheets are not specific to MFC, they are part of win API.

    I'm quite aware of the method using MFC but it does not work for me because I'm not using MFC!

  5. #5
    Registered User
    Join Date
    Dec 2007
    Posts
    213
    Quote Originally Posted by g-rat View Post
    Clearly you did not read my post. I am not using MFC at all. PropertySheets are not specific to MFC, they are part of win API.

    I'm quite aware of the method using MFC but it does not work for me because I'm not using MFC!
    I did read your message. You wrote CPropertySheet which is MFC. If you aren't using MFC then you aren't using CPropertySheet.

    It might be helpful if you posted some code showing what you've tried.

  6. #6
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,584
    CPropertySheet IS part of MFC. That class wraps Property Sheets in Win32 API. Prior to correcting others you may want to get your own facts straight. CPropertySheet is nowhere in the Win32 API. Look it up.

    If you wish to get rid of the buttons at the bottom the resource editor is a very good place to start. But then you don't use VC++ except that CPropertySheet is only available in VC++. I believe you are confused.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21