home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / IOC / LANCELOT / LGENERIC.CPP < prev    next >
C/C++ Source or Header  |  1995-04-07  |  3KB  |  55 lines

  1. /*******************************************************************************
  2. * FILE NAME: lgeneric.cpp                                                      *
  3. *                                                                              *
  4. * DESCRIPTION:                                                                 *
  5. *                                                                              *
  6. * Class                                                                        *
  7. *   AcheckBoxHandler                                                           *
  8. *                                                                              *
  9. * COPYRIGHT:                                                                   *
  10. *   Licensed Materials - Property of IBM                                       *
  11. *   (C) Copyright IBM Corporation 1992, 1995                                   *
  12. *   All Rights Reserved                                                        *
  13. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  14. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  15. *                                                                              *
  16. * CHANGE HISTORY:                                                              *
  17. *******************************************************************************/
  18.  
  19. #ifndef _IBASE_                         //Make sure ibase.hpp is included
  20.   #include <ibase.hpp>                  //  since that is where IC_<environ>
  21. #endif                                  //  is defined.
  22. #include "lancelot.h"
  23. #include <ictlevt.hpp>
  24. #include "lgeneric.hpp"
  25.  
  26. /******************************************************************************/
  27. /* ACheckBoxHandler::selected      - an ISelectEventHandler                     */
  28. /*   return true if event handled else return false                           */
  29. /* display the number of the button selected in a text control                */
  30. /******************************************************************************/
  31. IBase :: Boolean ACheckBoxHandler::selected(IControlEvent& evt )
  32. {
  33.  
  34.    unsigned long ulButtonId = evt.controlId();
  35.                                        // if the id is one of the buttons
  36.                                        // then display the button number in the
  37.  
  38.   switch (evt.controlId()) {       //Get command id
  39.  
  40.     case ID_CHECK_BOX:                    //Code to Process
  41.       //atusData.toggleActive();
  42.       if (toggle == true)
  43.          toggle = ACheckBoxHandler::false;
  44.       else
  45.          toggle = ACheckBoxHandler::true;
  46.  
  47.       return(true);                     //Return command processed
  48.       break;                            //
  49.  
  50.    }                            // static text control
  51.  
  52.    return (false);
  53.  
  54. } /* end ACheckBoxHandler::selected(...) */
  55.