Subj : Re: Need help with cursor managment To : borland.public.cpp.borlandcpp From : Jeff Baker Date : Thu Jun 24 2004 04:13 pm Yeah I played with that but I just couldn't get it to work correctly (I'm sure it's just me). I don't know how to use it correctly and I have no documentation showing an example. I'd be more then happy if someone could show me an example of it's use with this code. One more question, is there a way to use PtInRect so that it only returns true if the point is inside the rect? The PtInRect returns true if the point is to the left or above the rect as well as inside of it. Here is the revised code... case WM_PAINT: { GetClientRect(hwnd,&ta); ta.left += 100; ta.top += 100; ta.right -= 100; ta.bottom -= 100; HDC hdc = BeginPaint(hwnd,&paint_struct); SelectObject(hdc,GetStockObject(HOLLOW_BRUSH)); // Select a hollow brush Rectangle(hdc,ta.left,ta.top,ta.right,ta.bottom); ReleaseDC(hwnd,hdc); } break; case WM_MOUSEMOVE: { GetCursorPos(&loc); MapWindowPoints(HWND_DESKTOP,hwnd,&loc,2); if (PtInRect(&ta,loc)) SetCursor(cross); else SetCursor(arrow); ShowCursor(TRUE); } break; "Bob Gonder" wrote in message news:27njd01qhr7s0m20h7it9aqqo3tvjonll7@4ax.com... > Jeff Baker wrote: > > >I'm trying to get my cursor to change when it's located inside a target > >area. The code works with one exception...the cursor changes at incorrect > >locations. Does anybody have a guess; > > Haven't tried it, but also check out > WM_SETCURSOR > > .