problem in mouse event if control width is more than 32767

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi all i am having a problem mouse move event .
i created a control with width 40,0000 .now in mouse move event handler e.x
returns value upto 32767 units ,beyond it returns negative values , what to
do .actually i am using panel control , as i have to do a lot of drawing on it . say i have to draw rectangles . then i want to move these rectangles , now when i try to move these rectangle in mousemove event by changing the coordinates of rectangles as given by e.X all works fine upto 32767 but afetr tht e.X returns neagtive values , n moving of rectangles halts ,how to handle tht ..
 
Amit,

This is just a guess, but maybe casting the result to an unsigned Int16
(ushort) might give you the correct number.

Hope this helps.
 
Hi amit,

I'm really curious, how do you make a control with size 40,000? The size is
limited to 32767 and this limitation comes, as far as I know, from the
Windows OS itself.

Can you post some sample that creates such a huge control?. Then we might
workout something.
 
Back
Top