Click here to Skip to main content
15,925,255 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Use NT authentication in my app.... Pin
Tomasz Sowinski25-Mar-02 10:47
Tomasz Sowinski25-Mar-02 10:47 
GeneralRe: Use NT authentication in my app.... Pin
adara25-Mar-02 7:31
adara25-Mar-02 7:31 
GeneralRe: Use NT authentication in my app.... Pin
CherezZaboro25-Mar-02 7:47
CherezZaboro25-Mar-02 7:47 
GeneralDesktop shortcut Pin
Stan the man25-Mar-02 6:11
Stan the man25-Mar-02 6:11 
GeneralRe: Desktop shortcut Pin
Joaquín M López Muñoz25-Mar-02 6:20
Joaquín M López Muñoz25-Mar-02 6:20 
GeneralClass view bug Pin
Gutner25-Mar-02 5:00
Gutner25-Mar-02 5:00 
GeneralWebService Pin
Gfw25-Mar-02 4:47
Gfw25-Mar-02 4:47 
QuestionHow can I do this? Pin
lucy25-Mar-02 4:23
lucy25-Mar-02 4:23 
I have an SDI application. When WM_CLOSE message is received by CMainFrame, I want to check a flag bSthInProcess. I want the application to exit only when this flag is clear. So I coded
LRESULT CMainFrame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
    if ( message == WM_CLOSE )
    {
        CMyView *pView = (CMyView *)(GetActiveView());
        if (pView->bSthInProcess)
          MessageBox("wait while exiting.. "); //<== problem here
        while ( pView->bSthInProcess )
          Sleep(2);
    }
    
    return CFrameWnd::WindowProc(message, wParam, lParam);
}

the problem is, if I use MessageBox(), use have to click on the OK button. I want a message which will display the message, and close itself when the application closes.
How could I code it?Confused | :confused:
Thank you very much!Rose | [Rose]
AnswerRe: How can I do this? Pin
Le centriste25-Mar-02 5:02
Le centriste25-Mar-02 5:02 
GeneralRe: How can I do this? Pin
lucy25-Mar-02 5:53
lucy25-Mar-02 5:53 
GeneralRe: How can I do this? Pin
Paul M Watt25-Mar-02 6:06
mentorPaul M Watt25-Mar-02 6:06 
GeneralRe: How can I do this? Pin
lucy25-Mar-02 6:16
lucy25-Mar-02 6:16 
GeneralRe: How can I do this? Pin
Nish Nishant25-Mar-02 7:50
sitebuilderNish Nishant25-Mar-02 7:50 
GeneralRe: How can I do this? Pin
lucy25-Mar-02 8:37
lucy25-Mar-02 8:37 
GeneralRe: How can I do this? Pin
Nish Nishant25-Mar-02 8:47
sitebuilderNish Nishant25-Mar-02 8:47 
QuestionPerforming registration -- What does it performs ? Pin
Braulio Dez25-Mar-02 3:41
Braulio Dez25-Mar-02 3:41 
AnswerRe: Performing registration -- What does it performs ? Pin
Joaquín M López Muñoz25-Mar-02 6:10
Joaquín M López Muñoz25-Mar-02 6:10 
GeneralRe: Performing registration -- What does it performs ? Pin
Braulio Dez25-Mar-02 6:50
Braulio Dez25-Mar-02 6:50 
GeneralRe: Performing registration -- What does it performs ? Pin
Joaquín M López Muñoz25-Mar-02 6:59
Joaquín M López Muñoz25-Mar-02 6:59 
QuestionNT\2K users? Pin
Fred Ackers25-Mar-02 3:08
Fred Ackers25-Mar-02 3:08 
AnswerRe: NT\2K users? Pin
adara25-Mar-02 4:23
adara25-Mar-02 4:23 
GeneralRe: NT\2K users? Pin
Fred Ackers26-Mar-02 13:29
Fred Ackers26-Mar-02 13:29 
Generalquestion on SHFILEOPSTRUCT Pin
jafrazee25-Mar-02 3:04
jafrazee25-Mar-02 3:04 
GeneralRe: question on SHFILEOPSTRUCT Pin
Joaquín M López Muñoz25-Mar-02 7:32
Joaquín M López Muñoz25-Mar-02 7:32 
GeneralWindow's visual behavior overriding Pin
Aggtaa25-Mar-02 3:00
Aggtaa25-Mar-02 3:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.