WaitCursor and form disable
-
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
-
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
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