Solved

Dialog without the close option

Posted on 2000-03-22
1
157 Views
Last Modified: 2013-11-20
I'd like to create a modal dialog without the close option on the title bar. What I need to do?
0
Comment
Question by:mauling
1 Comment
 
LVL 23

Accepted Solution

by:
chensu earned 50 total points
ID: 2646649
Do the following.


BOOL CMyDlg::OnInitDialog()
{
    CDialog::OnInitDialog();

    CMenu* pSysMenu = GetSystemMenu(FALSE);
    if (pSysMenu != NULL)
    {
        pSysMenu->RemoveMenu(SC_CLOSE, MF_BYCOMMAND);
    }

    return TRUE;
}

void CMyDlg::OnClose()
{
      // Don't call CDialog::OnClose();
      return;
}
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
difference between String.subString() and String.subSequence() 6 137
no14 challenge 14 57
fix34  challenge 9 97
firstChar challenge 13 85
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now