home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / EVHANDLE.PAK / TEXTWND.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  1.1 KB  |  48 lines

  1. //----------------------------------------------------------------------------
  2. //  Project EVHANDLE
  3. //  
  4. //  Copyright ⌐ 1996. All Rights Reserved.
  5. //
  6. //  SUBSYSTEM:    EVHANDLE Application
  7. //  FILE:         textwnd.cpp
  8. //  AUTHOR:       
  9. //
  10. //  OVERVIEW
  11. //  ~~~~~~~~
  12. //  Source file for implementation of TextWindow.
  13. //
  14. //----------------------------------------------------------------------------
  15.  
  16.  
  17. #include "textwnd.h"
  18.  
  19. TextWindow::TextWindow(TWindow *par,char *title,TModule *mod):
  20.     TWindow(par,title,mod)
  21. {
  22.     Attr.X=5;
  23.    Attr.Y=5;
  24.    Attr.W=300;
  25.    Attr.H=100;
  26.    Attr.Style = WS_POPUPWINDOW | WS_CAPTION;
  27.    EventsList= new TListBox(this,101,0,0,300,100);
  28.    EventsList->Attr.Style &= ~LBS_SORT;
  29. }
  30.  
  31. void TextWindow::SetupWindow()
  32. {
  33.     TWindow::SetupWindow();
  34.    TRect rect=GetClientRect();
  35.    // resize listbox to the entire client area of its parent window
  36.    EventsList->SetWindowPos(0,rect,SWP_NOZORDER);
  37. }
  38.  
  39. //
  40. // Add the string passed in into the listbox
  41. //
  42. void TextWindow::OutputString(char *text)
  43. {
  44.     EventsList->AddString(text);
  45. }
  46.  
  47.  
  48.