OWL NExt - Knowledge Base

[ Home | Contents | Search | Next | Previous | Up ]

Disable 'X' Button in Dialog Box?

Date: 11/30/99
Time: 12:27:36 AM

Q. How do you disable the 'X' button in the upper right hand corner of a dialog box

A.  You need override funcion GetWindowClass(WNDCLASS& wndClass);

    void MyWindow::GetWindowClass(WNDCLASS& wndClass)
    {
        TWindow::GetWindowClass(wndClass);
        wndClass.style  &=    ~CS_NOCLOSE;
    }

Last changed: July 14, 2001