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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. WaitCursor and form disable

WaitCursor and form disable

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++
2 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.
  • E Offline
    E Offline
    Esquif
    wrote on last edited by
    #1

    Hi I got an application with a lenghtly task in managed C++. I wish to disable the form to prevent user from doing anything and have a waitcursor (hourglass) when the task is running. this->Cursor = Cursors::WaitCursor; this->Enabled = false; the task this->Enabled = true; this->Cursor = Cursors::Default; The problem is when I disable the form, the WaitCursor disapear. If I remove the call to restore the cursor, the WaitCursor appear with the form enable. Thanks for your help to resolve my problem SL

    S 1 Reply Last reply
    0
    • E Esquif

      Hi I got an application with a lenghtly task in managed C++. I wish to disable the form to prevent user from doing anything and have a waitcursor (hourglass) when the task is running. this->Cursor = Cursors::WaitCursor; this->Enabled = false; the task this->Enabled = true; this->Cursor = Cursors::Default; The problem is when I disable the form, the WaitCursor disapear. If I remove the call to restore the cursor, the WaitCursor appear with the form enable. Thanks for your help to resolve my problem SL

      S Offline
      S Offline
      Sujan Christo
      wrote on last edited by
      #2

      Hi Use the following code void CTestDlg::OnLongProcess() { CWaitCursor wait; . . . Sleep(4000); //Some Long Process . . . . wait.Restore(); //Restore the Wait cursor //Continue process } This may help you Sujan

      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