home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dho.zip / DHO / SRC / SOURCE.ZIP / control.cc < prev    next >
C/C++ Source or Header  |  1995-08-27  |  2KB  |  76 lines

  1. /****************************************/
  2. /*    Developer Helper Object Set       */
  3. /*  (C) 1994-95 Thomas E. Bednarz, Jr.  */
  4. /*     All rights reserved              */
  5. /***************************************/
  6.  
  7. /* $Id: control.cc 1.5 1995/08/13 03:21:12 teb Exp $ */
  8.  
  9. #include"control.h"
  10.  
  11. //-------------------------------------------------------------------
  12. //   TControl
  13. TControl::TControl(TWinBase *parent, ULONG resource)
  14. {
  15.    fParent = parent;
  16.    fResource = resource;
  17.    hwndControl = WinWindowFromID( fParent->getHWND() , fResource);
  18. }
  19.  
  20.  
  21. //-------------------------------------------------------------------
  22. //   TControl
  23. TControl::TControl(TWinBase *parent)
  24. {
  25.    fParent = parent;
  26.    fResource = 0;
  27.    hwndControl = (HWND)NULL;
  28. }
  29.  
  30.  
  31. //-------------------------------------------------------------------
  32. //   ~TControl
  33. TControl::~TControl()
  34. {
  35.  
  36. }
  37.  
  38.  
  39. //-------------------------------------------------------------------
  40. //   SendMessage
  41. MRESULT TControl::SendMessage(ULONG ul, MPARAM mp1, MPARAM mp2)
  42. {
  43.    return WinSendMsg( hwndControl, ul, mp1, mp2);
  44. }
  45.  
  46.  
  47. //-------------------------------------------------------------------
  48. //   getClassName
  49. const char *TControl::getClassName()
  50. {
  51.    return "TControl";
  52. }
  53.  
  54. //-------------------------------------------------------------------
  55. //   showControl
  56. void TControl::showControl()
  57. {
  58.    WinShowWindow(hwndControl, TRUE);
  59. }
  60.  
  61.  
  62. //-------------------------------------------------------------------
  63. //   enable
  64. void TControl::enable()
  65. {
  66.    WinEnableWindow(hwndControl, TRUE);
  67. }
  68.  
  69.  
  70. //-------------------------------------------------------------------
  71. //   disable
  72. void TControl::disable()
  73. {
  74.    WinEnableWindow(hwndControl, FALSE);
  75. }
  76.