Click here to Skip to main content
15,886,091 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
There is this app I am working on that has several dialogue boxes codes and resource being contained in MFC Extension DLL's.

The problem is that some times these dialogue boxes take some time to process before being destroyed which may give the user the impression than the app has hung.

So i decided to load the WAIT cursor during processing ( to give users feedback that the app is still much running) and load back the ARROW cursor once processing is done.

The strange thing is that all my efforts so far have yielded no result.

I have used all of the following approaches:

1.
C++
 CWinApp *pWinApp = AfxGetApp();
 HCURSOR hNewCursor = pWinApp.LoadCursor(IDC_WAIT);
 HCURSOR hOldCursor = SetCursor(hNewCursor);


// Dialogue box processes follow
SetCurSor(hOldCursor);


2.

C++
HCURSOR hOldCurLoadCursor(m_DLLInstance,IDC_WAIT);

//Dialogue box processes follow

SetCusor(hOldCursor);


3.

C++
HCURSOR hOldCurLoadCursor(m_AppInstance,IDC_WAIT);

//Dialogue box processes follow

SetCusor(hOldCursor);


Yet I get no cursor change.
Please , how do I resolve this?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900