Re: update window or invalidate or something

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Janiv Ratson (janiv_at_aoe6.net)
Date: 05/16/04

  • Next message: Scott McPhillips [MVP]: "Re: update window or invalidate or something"
    Date: Sun, 16 May 2004 19:26:17 +0200
    
    

    The progress bar thread code is as following:

    DWORD WINAPI ThreadProgressBar(LPVOID lpParameter)

    {

    ConfigToolUtils* pUtils = (ConfigToolUtils*)lpParameter;

    CProgressBarDlg* pProgressBar = new CProgressBarDlg;

    pProgressBar->Create(IDD_DIALOG_PROGRESS_BAR);

    pProgressBar->CenterWindow();

    pProgressBar->UpdateWindow();

    pProgressBar->ShowWindow(SW_SHOW);

    pProgressBar->Start(pUtils->m_strMesssage);

    pProgressBar->Invalidate();

    pProgressBar->UpdateWindow();

    MSG msg;

    while(!(pUtils->m_bStopProgressBarThread) && GetMessage(&msg, NULL, 0, 0))

    {

        if(IsDialogMessage(pProgressBar->GetSafeHwnd(),&msg))

        {

            TranslateMessage(&msg);

            DispatchMessage(&msg);

        }

    }

    pProgressBar->Stop();

    pProgressBar->DestroyWindow();

    delete pProgressBar;

    return 0;

    }

    "Janiv Ratson" <janiv@aoe6.net> wrote in message
    news:u9Z8%23F2OEHA.1340@TK2MSFTNGP12.phx.gbl...
    > Hi,
    > I have an MDI.
    > I also have a dialog which represent a progress bar.
    > When I show the progress bar dialog, the data behind (all MDI data) is not
    > redrawn,
    > so it looks like in a middle of something.
    > I want the GUI in the back, to be drawn, how do I do it ?
    > 10x,
    > Janiv.
    >
    >


  • Next message: Scott McPhillips [MVP]: "Re: update window or invalidate or something"

    Relevant Pages

    • Re: update window or invalidate or something
      ... CProgressBarDlg* pProgressBar = new CProgressBarDlg; ... > I also have a dialog which represent a progress bar. ... > When I show the progress bar dialog, the data behind (all MDI data) is not ...
      (microsoft.public.vc.mfc)
    • update window or invalidate or something
      ... I also have a dialog which represent a progress bar. ... When I show the progress bar dialog, the data behind (all MDI data) is not ... I want the GUI in the back, to be drawn, how do I do it? ...
      (microsoft.public.vc.mfc.docview)
    • update window or invalidate or something
      ... I also have a dialog which represent a progress bar. ... When I show the progress bar dialog, the data behind (all MDI data) is not ... I want the GUI in the back, to be drawn, how do I do it? ...
      (microsoft.public.vc.mfc)