protected override void WndProc(ref Message m)reference: http://www.codeproject.com/cs/miscctrl/DateTimeSlicker.asp?df=100&forumid=28242&exp=0&select=902128
{
int x = (m.LParam.ToInt32() << 16) >>16;
int y = m.LParam.ToInt32() >> 16;
base.WndProc(ref m);
}
Sunday, June 10, 2007
Obtaining mouse x and y coordinates from a Windows message, in C#
The lower 4 bits of LParam represent the mouse x coordinate; the upper 4 bits represent the y coordinate.
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2007
(12)
-
▼
June
(9)
- WPF: getting a data-bound data template and the it...
- The best tutorial about data binding in WPF
- Day of Silence
- LearnWPF.com
- The correct way to repaint a form or control in c#...
- Postable: convert codes to make them show up prope...
- Obtaining mouse x and y coordinates from a Windows...
- Windows Message Handling, in C#
- Dealing with my clutter
-
▼
June
(9)
0 comments:
Post a Comment