Using Win32 functions in Visual FoxPro Image Gallery
Mouse Input
Code examples:
Tracking mouse movement to detect when to start dragging
..msdn    Add comment     W32 Constants      Translate this page
The DragDetect function captures the mouse and tracks its movement until the user releases the left button, presses the ESC key, or moves the mouse outside the drag rectangle around the specified point.
Code examples:
Tracking mouse movement to detect when to start dragging
BOOL DragDetect(
  HWND hwnd,   // handle to window
  POINT pt     // initial position
FoxPro declaration:
DECLARE INTEGER DragDetect IN user32;
    INTEGER   hwnd,;
    STRING  @ pt
[in] Handle to the window receiving mouse input.

[in] Initial position of the mouse, in screen coordinates. The function determines the coordinates of the drag rectangle by using this point.
Return value:
If the user moved the mouse outside of the drag rectangle while holding down the left button , the return value is nonzero.
My comment:
The width and height of the drag rectangle are specified by the SM_CXDRAG and SM_CYDRAG values returned by the GetSystemMetrics function.

The system metrics for the drag rectangle are configurable (through the Windows Registry), allowing for larger or smaller drag rectangles.
Word Index links for the DragDetect :
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2002-02-25 23:23:21
Modified: 2002-02-25 23:30:36
Visited in last 7 days: 53
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2018 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
9 sec.Function: 'GetPrintProcessorDirectory'
Function group: 'Printing and Print Spooler'
24 sec.Function: 'OpenEvent'
36 sec.Login
48 sec.Function: 'mixerGetID'
Function group: 'Windows Multimedia'
1.03 min.Function: 'GetProcessVersion'
Function group: 'Process and Thread'
1.2 min.Function: 'DrawText'
Function group: 'Font and Text'
1.37 min.Function: 'BlockInput'
1.58 min.Function: 'SizeofResource'
Function group: 'Resource'
1.75 min.Example: 'Winsock: reading email messages (POP3, port 110)'
1.93 min.Links
Advertise here!