home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / windows / c / mobjm260 / sdivider.cp_ / sdivider.cp
Encoding:
Text File  |  1994-09-06  |  1.3 KB  |  57 lines

  1. //    Microworks ObjectMate 2.6
  2. //
  3. //  "SFX Class Library"
  4. //
  5. //    An ObjectWindows 2.0 extension for Borland C++ 4.0
  6. //
  7. //    Copyright 1992-94 Microworks Sydney, Australia.
  8. //
  9. //  SDIVIDER.CPP 
  10.  
  11. #include <owl\owlpch.h>
  12. #include <sfx\sfx200.h>
  13. #include "sfx\sdivider.h"
  14.  
  15. IMPLEMENT_STREAMABLE_FROM_BASE(TSFXDivider, TControl);
  16.  
  17. //    constructor for a TSFXDivider object
  18.  
  19. TSFXDivider::TSFXDivider(TWindow*        parent,
  20.                          int             id,
  21.                          int x, int y, int length,
  22.                          BOOL            isVertical,
  23.                          BOOL            isHump,
  24.                          BOOL            borStyle,
  25.                          TModule*        module)
  26.     :TControl(parent, id, "", x, y, 0, 0, module)
  27. {
  28.     Attr.Style = (WS_CHILD | WS_VISIBLE | WS_GROUP);
  29.     if (isVertical)
  30.     {
  31.         isHump ? (Attr.Style |= MSH_VHUMP) : (Attr.Style |= MSH_VDIP);
  32.         Attr.H = length;
  33.     }
  34.     else
  35.     {
  36.         isHump ? (Attr.Style |= MSH_HHUMP) : (Attr.Style |= MSH_HDIP);
  37.         Attr.W = length;
  38.     }
  39.     if (borStyle)                                           
  40.         Attr.Style |= MSH_BORSTYLE;
  41. }
  42.  
  43. //    constructor for a TSFXDivider resource object 
  44.  
  45. TSFXDivider::TSFXDivider(TWindow* parent, int resourceId, TModule* module)
  46.     :TControl(parent, resourceId, module)
  47. {
  48.     DisableTransfer();
  49. }
  50.  
  51. char far*
  52. TSFXDivider::GetClassName()
  53. {
  54.     return "SFXSHADE";
  55. }
  56.  
  57.