PureBytes Links
Trading Reference Links
|
Hi,
Many TJ's examples in this page could help you.
http://www.amibroker.org/userkb/?s=button
Best regards
spi_maker a écrit :
>
>
>
> I'm having trouble with GetCursorXPosition/GetCursorYPosition.
>
> Clicking on the panel definitely registers, but I'm getting null values
> returned for x, y, px & py.
>
> Regardless of whether I do it in an if (as in the example below) or as a
> function EventHandler(), I am still getting nothing returned from the
> GetCursorPosition.
>
> Any ideas what might be going astray here?
>
> Thanks in advance
>
> if( GetCursorMouseButtons() & 1)
> {
> // retrieve co-ordinates in date/value units
> x = GetCursorXPosition(0);
> y = GetCursorYPosition(0);
>
> // retrieve co-ordinates in pixel units
> px = GetCursorXPosition(1);
> py = GetCursorYPosition(1);
>
> // Convert the xy coordinates into Row Column coordinates
> MouseCol = floor( px / CellWidth );
> MouseRow = floor( py / CellHeight );
>
> printf("Left mouse button is pressed down\n");
> printf("MC " + MouseCol + " BC " + ButtonCol + " MR " + MouseRow + " BR
> " + ButtonRow + "\n");
> printf("x " + x + " y " + y + "\n");
> printf("px " + px + " py " + py + "\n");
> }
>
>
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|