home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
328_01
/
wbuttong.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-03-28
|
620b
|
38 lines
/* wbutton_getptr()
* this function scans the list of buttons
* looking for a match to specified value.
* returns NULL if not found or inactive.
* returns ptr to button if found
*/
#include "wtwg.h"
#include <ctype.h>
WBUTTON *wbutton_getptr ( int uval )
{
WBUTTON *Bptr;
for ( Bptr = w0->winbutton;
Bptr;
Bptr = Bptr->Bchain )
{
if ( uval == Bptr->Bval )
{
if ( ( Bptr -> Bstyle & WBTN_ACTIVE ) == 0 )
{
/* test to see if button is temp inactive
*/
Bptr = NULL;
}
break;
}
}
return (Bptr); /* wbutton_getptr */
}