I click on image and I can see the coordinates
I f move the scroll and I click I see the same coordinates How I make to see the right position ?
- Code: Select all Expand view
- #include "FiveWin.ch"
static oWnd,oImage
function Main()
Local cImage
DEFINE WINDOW oWnd TITLE "Testing the Mouse"
@ 0, 0 IMAGE oImage SIZE 480, 400 OF oWnd SCROLL NOBORDER
SET MESSAGE OF oWnd TO "Press any mouse button" CENTERED
oImage:bLClicked = { | nRow, nCol, nFlags | Msginfo( nrow,ncol) }
ACTIVATE WINDOW oWnd;
ON INIT cImage:= GetImage()
RETURN NIL
//----------------------------------------------------------------------//
function GetImage()
local gcFile := cGetFile( "Bitmap (*.bmp)| *.bmp|" + ;
"DIB (*.dib)| *.dib|" + ;
"PCX (*.pcx)| *.pcx|" + ;
"JPEG (*.jpg)| *.jpg|" + ;
"GIF (*.gif)| *.gif|" + ;
"TARGA (*.tga)| *.tga|" + ;
"RLE (*.rle)| *.rle|" + ;
"All Files (*.*)| *.*" ;
,"Please select a image file", 4 )
if ! Empty( gcFile ) .and. File( gcFile )
oImage:LoadBmp( gcFile )
endif
return gcFile