when i modify Cursor in OnMouseMove,but the Cursor not change
i must call Format() ?
Modify Cursor
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
No items,I draw some areas in OnPaint
when the mouse into different areas ,i want change different curosr
OnMouseMove:
TPoint ptCursor;
GetCursorPos(&ptCursor);
ptCursor = ScreenToClient(ptCursor);
if(pRVESystemBar->PtInSystemBar(Handle,ptCursor))//call PtInRect
{
Cursor = crHandPoint;
}
else
{
Cursor = crDefault;
}
but the cursor not change
when the mouse into different areas ,i want change different curosr
OnMouseMove:
TPoint ptCursor;
GetCursorPos(&ptCursor);
ptCursor = ScreenToClient(ptCursor);
if(pRVESystemBar->PtInSystemBar(Handle,ptCursor))//call PtInRect
{
Cursor = crHandPoint;
}
else
{
Cursor = crDefault;
}
but the cursor not change
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I made a small test:
The cursor is changed as expected, when the mouse is close to the left border.
Code: Select all
procedure TForm3.RichViewEdit1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if X<20 then
RichViewEdit1.Cursor := crHelp
else
RichViewEdit1.Cursor := crIBeam;
end;