Hi,

      u change your code like this.

     FrmGetObjectBounds (frmP, objIndex, &Rect);

     myEvent.eType  =  ctlSelectEvent;
     myEvent.ctlSelect.controlID= buttonID (which is given in constructor);

     EvtAddEventToQueue(myEvent);


    Better you try this

n




----- Original Message -----
From: "Sumita Malik" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, February 25, 2002 2:57 PM
Subject: Re: Emulating a pen down Event


> Seen 'CtlHitControl' in Palm Ref?
>
> >>> [EMAIL PROTECTED] 02/25/02 02:34PM >>>
> I would like to emulate a press on a displayed button.
> I have obtained the information regarding the button, filled an
> EventType
> structure and sent it.
> However, nothing happens. Is there something wrong/missing in the
> following
> snippet ? Is there a better way to accomplish this ?
> (Note: I am NOT the application running at the time).
>
>     FrmGetObjectBounds (frmP, objIndex, &Rect);
>
>     myEvent.eType  =  penDownEvent;
>     myEvent.penDown = true;
>     myEvent.tapCount = 1;
>     myEvent.screenX = Rect.topLeft.x+1;    // just to make sure within
> limits
>     myEvent.screenY = Rect.topLeft.y+1;    //    just to make sure
> within
> limits
>
>     EvtAddEventToQueue(myEvent);
>
>
> -- Eli Mandel
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to