home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / borllexp / blx_1_2 / stdwin.h < prev    next >
Text File  |  1991-05-02  |  1KB  |  38 lines

  1. // stdwin.h
  2.  
  3. #include<windows.h>
  4. #include"winapp.h"
  5.  
  6. #if !defined(STDWIN_H)
  7.  
  8. /* STDWIN
  9. A class derived from Window. This class creates a standard, overlapped Window
  10. with Scroll bars.
  11. */
  12. class WinAppStdWindow : public Window
  13.     {
  14.     public:
  15.         WinAppStdWindow(WinApp *myApp, WinClass *wc, char *name) :
  16.             Window(myApp,wc)
  17.             {
  18.                 // StdWindow class settings
  19.             AddClassStyle(CS_HREDRAW | CS_VREDRAW);
  20.  
  21.                 // Window settings: OVERLAPPEDWINDOW includes
  22.                 // OVERLAPPED, CAPTION, SYSMENU, THICKFRAME,MINIMIZE_BOX,
  23.                 // and MAXIMIZE_BOX
  24.             AddWinStyle(WS_BORDER | WS_OVERLAPPEDWINDOW | WS_VISIBLE);
  25.             AddWinStyle(WS_HSCROLL | WS_VSCROLL);
  26.  
  27.             SetWinInstance(myApp->GetInstance());
  28.             SetWinX(CW_USEDEFAULT);
  29.             SetWinY(CW_USEDEFAULT);
  30.             SetWinWidth(CW_USEDEFAULT);
  31.             SetWinHeight(CW_USEDEFAULT);
  32.             SetWinName(name);
  33.             }
  34.     };
  35.  
  36. #define STDWIN_H
  37. #endif
  38.