Screen coords in .NET CF versus Win32

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
 
P

Paul G. Tobey [eMVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top