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

  1. /****************************************/
  2. /*    Developer Helper Object Set       */
  3. /*  (C) 1994-95 Thomas E. Bednarz, Jr.  */
  4. /*     All rights reserved              */
  5. /***************************************/
  6.  
  7. /* $Id: bmp_pbtn.cc 1.2 1995/08/13 03:21:12 teb Exp $ */
  8.  
  9.  
  10. #include"bmp_pbtn.h"
  11. #include"stdio.h"
  12.  
  13. //-------------------------------------------------------------------
  14. //   TPushButton
  15. TBmpPushButton::TBmpPushButton(TWinBase *parent, ULONG resource):
  16.    TControl(parent, resource)
  17. {
  18.  
  19. }
  20.  
  21.  
  22. //-------------------------------------------------------------------
  23. //   TPushButton
  24. TBmpPushButton::TBmpPushButton(TWinBase *parent, ULONG bmpId, ULONG id, LONG xPos, LONG yPos,
  25.                   LONG xWidth, LONG yHeight):
  26.      TControl(parent, 0)
  27. {
  28.    char text[50];
  29.    sprintf(text, "#%ld", bmpId);
  30.    hwndControl = WinCreateWindow (
  31.                       fParent->getHWND(),
  32.                       WC_BUTTON,
  33.                       (PSZ)text,
  34.                       WS_VISIBLE | BS_PUSHBUTTON | BS_BITMAP,
  35.                       xPos, yPos, xWidth, yHeight,
  36.                       fParent->getHWND(),
  37.                       HWND_TOP,
  38.                       id, (PVOID)NULL, (PVOID)NULL);
  39.  
  40. }
  41.  
  42. //-------------------------------------------------------------------
  43. //   ~TPushButton
  44. TBmpPushButton::~TBmpPushButton()
  45. {
  46.  
  47. }
  48.  
  49.  
  50. //-------------------------------------------------------------------
  51. //   getClassName
  52. const char *TBmpPushButton::getClassName()
  53. {
  54.    return "TBmpPushButton";
  55. }
  56.