views:

607

answers:

1

Is there an easy way to remove the close button from an MFC feature pack caption bar?

(I don't mean the window caption, I'm talking about the little information bar that can appear at the top of the client area in these apps - ie:CMFCCaptionBar)

Thanks

+2  A: 

Figured out one way...

class CNoCloseCaptionBar : public CMFCCaptionBar
{
public:
    CNoCloseCaptionBar()
    {
    }

    virtual void RecalcLayout()
    {
     __super::RecalcLayout();
     m_rectClose.SetRectEmpty();
    }

};
cantabilesoftware