|
Question : how to get move line through mouse drag in view?
|
|
mouse click on line drawn in view not givin correct x,y value. how to get move line through mouse drag in view? eg: if I draw a line through ondraw() on moveto(100,100); lineto(200,200) if I click mouse on starting point of line then its gives 20,10 I am using splitter view.
|
|
Answer : how to get move line through mouse drag in view?
|
|
That usually means that one set of X,Y are in "screen coordinates" and the other X,Y is in "client" (or "window") corrdinates. Use the ClientToScreen() API:
How To Translate Client Coordinates to Screen Coordinates http://support.microsoft.com/kb/11570
ClientToScreen (API fn) http://msdn2.microsoft.com/en-us/library/ms532670.aspx
|
|
|
|