Now I have it working. One question is, how do I determine the starting position of the mouse pointer? I'm using a formless window.