Change cursor mfc


Hi all,

I am trying to change the cursor to wait mode while doing some operations and i can't achieve it...

http://support.microsoft.com/kb/131991

So basically I have this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
BOOL CViewMyView::OnSetCursor(CWnd* pWnd, UINT nHitTest,UINT message)
{
        if(m_ChangeCursor){
		RestoreWaitCursor();
		return TRUE;
	}	
	return CViewStn::OnSetCursor(pWnd, nHitTest, message); 
        //instead of CView::OnSetCursor... as my view belongs to CViewStn
}

void CViewMyViw::OnButtonGet()
{
        ...
        m_ChangeCursor = TRUE;
        BeginWaitCursor();
       //From here we go through another class which calls the Report function
       ...
}

void CViewMyView::Report()
{
       //create report
       ...
       EndWaitCursor();
       m_ChangeCursor = FALSE;
       
       ...
}


One of my problems is that i never get to the OnSetCursor it's supposed to be called automatically right?

What can i do to fix this... any guideline?

Thanks in advance. Any help will be appreciated.

Regards
Last edited on
You create a CWaitCursor.
Topic archived. No new replies allowed.