This example should be enough for you to get rolling!

//MWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMW
// GetObjectPtr
//              This routine returns a pointer to an object in the current
//              form.
// Parameters:
//              objectId - id of the object on the current form
//      Returns:
//              VoidPtr - pointer to requested object
//MWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMW
VoidPtr GetObjectPtr(Word objectID)
{
        FormPtr frmP;

        frmP = FrmGetActiveForm();
        if (!frmP) return 0;

        return (FrmGetObjectPtr(frmP, FrmGetObjectIndex(frmP, objectID)));
}

Void MyFunction(void)
{
        ControlPtr pControl;

        pControl = GetObjectPtr(MainClickMeButton);
        CtlHideControl(pControl);
}

> -----Original Message-----
> From: Tang Ai Lee [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 30, 2000 11:18 PM
> To: Palm Developer Forum
> Subject: CONTROL BUTTON -- PRESS BUTTON
> 
> 
> 
> 
> Hi all,
> 
> I would like to know , how to get control pointer?  i want to 
> deactive a
> button, but i dont  know how to get control ptr.
> As such, once i click on press button, the button will be 
> highlighted. So ,
> how to unhighlight the press button?
> In order to do that, should i get control ptr first? If yes, 
> how to get?
> 
> 
> rgds,
> ailee
> 
> 
> +++++ You May Like To Know +++++
> 
> New Accounting Standards Seminars, starting 15 Dec 00 - a MUST for all
> accounting personnel. Speaker:  Accounting industry veteran 
> Mr Kaka Singh,
> who also serves on the Financial Statements Review Committee of the
> Institute of Certified Public Accountants of Singapore. For 
> details, please
>  call 5311812/3 or email [EMAIL PROTECTED]
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Stocktake with Palm device - a 500g palm device is all you all need to
> carry to the store this season. Enjoy tremendous savings in 
> manpower and
> time costs with Palm.Ezy Stocktake - only $500 from now till 
> 15 Dec 00.
> More details, please call 5314697 or email [EMAIL PROTECTED]
> 
> **************************************************************
> *************
> NOTICE - This e-mail and any files transmitted with it are 
> confidential and
> are only for the use of the person to whom they are 
> addressed. If you are
> not the intended recipient, you have received this e-mail in 
> error. Any
> use, dissemination, forwarding, printing, copying or dealing 
> in any way
> whatsoever with this e-mail is strictly prohibited. If you 
> have received
> this e-mail in error, please reply immediately by way of advice to us.
> 
> It is the addressee/recipient's duty to virus scan and 
> otherwise test the
> information provided before loading onto any computer system. 
> We do not
> warrant that the information is free of a virus or any other defect or
> error.
> 
> Any views expressed in this message are those of the 
> individual sender,
> except where the sender specifically states them to be the 
> views of the
> firm.
> **************************************************************
> *************
> 
> 
> 
> -- 
> 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