Antonio,
A while back I asked about capturing signatures on the handheld. You suggested it may be easy to do using mouse events and setpixel(). I put together a little program using FWH to see if I could make it work on the desktop. The problem is when dragging the mouse the pixels set are too far apart unless you move the mouse very slowly. The following is a sample. Should I be doing something different or doing this a different way?
// Capture Signature
#include "FiveWin.ch"
static oWnd, lDown, hDC
function Main()
lDown := .F.
DEFINE WINDOW oWnd FROM 1, 1 TO 30, 50 ;
TITLE OemToAnsi( "Signature Capture with the mouse" ) ;
MENU BuildMenu()
oWnd:bLClicked := { || lDown := .T. }
oWnd:bLButtonUp := { || lDown := .F. }
oWnd:OnMouseMove:= { | obj, x, y, flags| DrawL(y,x) }
hDC := oWnd:GetDC()
ACTIVATE WINDOW oWnd
return 0
STATIC FUNCTION DrawL(y,x)
IF lDown
SetPixel(hDC, y, x, RGB(0,0,0) )
ENDIF
RETURN NIL
function BuildMenu()
local oMenu
MENU oMenu
MENUITEM "&File"
MENU
MENUITEM "&Clear" ACTION oWnd:Refresh()
ENDMENU
MENUITEM "&End" ACTION oWnd:End()
ENDMENU
return oMenu