Re: mouse coordinates
Posted in 1997
dbonnici@ptl.com.mt (David Bonnici) wrote: >Ok... type this function in your newera code... You have to compile to c >code for it to work..... >FUNCTION getcursorposition() RETURNING Integer,Integer > VARIABLE x,y INTEGER > BEGIN_C > { > POINT *mypoint; > > (void)GetCursorPos(mypoint); > x = (int)(mypoint->x); > y = (int)(mypoint->y); > } > END_C > RETURN x,y >END FUNCTION >There... now if you paste a button and in the activate handler type: >DISPLAY getcursorposition() >you should see the x and y positions... You don't seem to initialise mypoint. Is that ok? How about: POINT mypoint; (void)GetCursorPos(&mypoint); x = (int)(mypoint.x); y = (int)(mypoint.y); >I am trying to implement timers in NewEra for the bubble sort of help.. >did any one manage yet ?? I have seen and tested some timer code done by stuarth@informix.com. E-mail him for a copy. Be careful when using timers though because if the application is doing some sql while the timer goes off it causes wierd results. David David W Chan GO5 Limited david@go5.com (work) dwc@cix.compulink.co.uk (home)