Screen coords in .NET CF versus Win32

  • Thread starter Thread starter JB
  • Start date Start date
J

JB

Hi, I was wondering how the .NET CF screen coords in say

System.Drawing.Point(8,40) can be mapped to equivalent coords for use by
the SetWindowPos(0,8,40,cx,cy, flags) function in C++ Using the same
values doesn't work. Is there any way to do a translation even on paper.
Reason being i'm doing a C++ app but using some code of another .NET CF
app we have to base it on.

Thanks
 
Points for drawing are usually in the client coordinates of a given window.
SetWindowPos() uses screen coordinates (relative to the top-left corner of
the screen). You can use ClientToScreen() or MapWindowPoints() to do the
conversion. It all makes perfect sense.

Paul T.
 
Back
Top