Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:112)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:112)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:112)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:112)
OrbWorks Community Forum • View topic - Developing in pocketc

Developing in pocketc

Discuss PocketC for CE (including Desktop Edition)

Postby smoscar_01 on Fri Nov 17, 2006 11:49 am

why does the functions penx/y() or mousex/y() doesnt seem to retrieve the mouse position?
smoscar_01
 
Posts: 1
Joined: Thu Nov 16, 2006 1:52 pm
Location: Mexico

Postby daparty on Thu Nov 23, 2006 10:18 pm

I'm not sure what you're running on, but I keyed this program on my Jornada 540 to show you an example of the penx() and peny() functions.

main()
{
int x,y;
string s;
while(1)
{
waitp(); // wait for a pen event
x = penx(); // get value of event PM_BUTTONUP
y = peny(); // get value of event PM_BUTTONUP
clearg(); // clear graphics screen so text doesn't overlap
s = "x=" + x + " y=" + y; // creat string
text(25, 25, s); // print string
}
}

After you build and run the program, tap the screen in different places and their x, y values will print on the screen.

The functions penx() and peny() are pen events and the function
waitp() waits for a pen event;

Hope this helps.

Dave.
daparty
 
Posts: 7
Joined: Mon Mar 08, 2004 11:44 pm


Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 2 guests

cron