![]()  | 
![]()  | 
![]()  | 
![]()  | 
![]()  | 
This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. | 
Find the record associated with a resource
PtResourceRec_t const * PtFindResource(
    long type,
    PtWidgetClass_t const * const a_class );
This function finds the resource record for the resource given by type in the a_class class or any of its superclasses. You can use this function to detect whether a widget implements a particular resource or not, or in your own Set Resource/Get Resource methods.
A pointer to a resource record, or NULL if no resource is found.
my_label_setcolor( PtWidget_t *widget, PgColor_t color )
{
  const PtResourceRec_t *res_rec;
  PtArg_t argt;
  PtSetArg( &argt, Pt_ARG_COLOR, color, 0 );
  res_rec = PtFindResource( Pt_ARG_COLOR,
                                  PtLabel->wclass );
  PtSetValue( widget, res_rec, &argt );
}
Photon
| Safety: | |
|---|---|
| Interrupt handler | No | 
| Signal handler | No | 
| Thread | No | 
![]()  | 
![]()  | 
![]()  | 
![]()  |