问题提示:
error C2601: 'GetCursorRegion' : local function definitions are illegal头文件:
// Implementation
// 类名: CMouseHandlerView::
public:
HCURSOR m_hCursor[16];
void OnMouseMove(UINT nFlags,CPoint point);
int GetCursorRegion(POINT *lpPt);
BOOL OnSetCursor(CWnd* pWnd,UINT nHitTest,UINT message);
virtual ~CMouseDemo2View();函数原型:
///////////////////////////////////////////////////////////////////
// Call the default OnSetCursor() function
int CMouseDemo2View::GetCursorRegion(POINT *lpPt)
{
// We'll need the client
// rectangle so that we can
// calculate the cursor region.
// It'll be an x value from 0-3
// and a y value from 0-3.
RECT Rect;
GetClientRect(&Rect); // Divide the client rectangle width
// by four to obtain the x region
// index, int x=(lpPt->x*4)/Rect.right;
if(x>3)
x=3; // Divide the client rectangle height
// by four to obtain the y region
// index int y=(lpPt->y*4)/Rect.bottom;
if(y>3)
y=3; // Return the index. 
// It'll be a value from 0-15. return(y*4+x);}曾用过的解决之道:
  函数名前缀 extern 效果:
  无