Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problems with IProgressDialog

Problems with IProgressDialog

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Barry True
    wrote on last edited by
    #1

    I have an application that uses the IProgressDialog interface to dislay a progress dialog during long processing steps. Everything works fine until I invoke the StopProgressDialog method to close the dialog. The progress dialog doesn't disappear until I move the mouse over it. Does anyone know what could be causing this?

    D 1 Reply Last reply
    0
    • B Barry True

      I have an application that uses the IProgressDialog interface to dislay a progress dialog during long processing steps. Everything works fine until I invoke the StopProgressDialog method to close the dialog. The progress dialog doesn't disappear until I move the mouse over it. Does anyone know what could be causing this?

      D Offline
      D Offline
      DrewH
      wrote on last edited by
      #2

      Did you ever figure out the solution? I am having the exact same issue.

      B 1 Reply Last reply
      0
      • D DrewH

        Did you ever figure out the solution? I am having the exact same issue.

        B Offline
        B Offline
        Barry True
        wrote on last edited by
        #3

        It's been a while since I had this problem but I believe what we ended up doing was to get the window handle of the dialog and force it down. I no longer have access to the code but if I can find out from a person who's still working on the project I'll try to post the code we used.

        D 1 Reply Last reply
        0
        • B Barry True

          It's been a while since I had this problem but I believe what we ended up doing was to get the window handle of the dialog and force it down. I no longer have access to the code but if I can find out from a person who's still working on the project I'll try to post the code we used.

          D Offline
          D Offline
          DrewH
          wrote on last edited by
          #4

          After searching the internet some more I found the same answer. Following is the code, in case anyone else has this issue. HWND hDlgWnd(NULL); HRESULT hr; IOleWindow *pOleWindow; //Sometimes the progress dialog sticks around after stopping it, //until the mouse pointer is moved over it or some other triggers. //This process finds the hwnd of the progress dialog and hides it //immediately. if (SUCCEEDED(m_pprogressdlg->QueryInterface(IID_IOleWindow, reinterpret_cast (&pOleWindow)))) { hr = pOleWindow->GetWindow(&hDlgWnd); if(FAILED(hr)) { hDlgWnd = NULL; } pOleWindow->Release(); } m_pprogressdlg->StopProgressDialog(); if (hDlgWnd) ::ShowWindow(hDlgWnd, SW_HIDE); m_pprogressdlg.Release();

          B 1 Reply Last reply
          0
          • D DrewH

            After searching the internet some more I found the same answer. Following is the code, in case anyone else has this issue. HWND hDlgWnd(NULL); HRESULT hr; IOleWindow *pOleWindow; //Sometimes the progress dialog sticks around after stopping it, //until the mouse pointer is moved over it or some other triggers. //This process finds the hwnd of the progress dialog and hides it //immediately. if (SUCCEEDED(m_pprogressdlg->QueryInterface(IID_IOleWindow, reinterpret_cast (&pOleWindow)))) { hr = pOleWindow->GetWindow(&hDlgWnd); if(FAILED(hr)) { hDlgWnd = NULL; } pOleWindow->Release(); } m_pprogressdlg->StopProgressDialog(); if (hDlgWnd) ::ShowWindow(hDlgWnd, SW_HIDE); m_pprogressdlg.Release();

            B Offline
            B Offline
            Barry True
            wrote on last edited by
            #5

            As I recall, that's basically what we did as well. I'll double-check this when I can get the code fragment from my co-worker.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups