home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / c / WINCLASS.ZIP / SWIN.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-28  |  1.1 KB  |  36 lines

  1. #if !defined(SWIN_H)
  2. #include <windows.h>
  3. #include "winbase.h"
  4.  
  5. class StdWindow : public WindowRegClass {
  6.     LPSTR WinName;
  7.     HANDLE hInstance;
  8. public:
  9.     StdWindow(LPSTR WinN, HANDLE hInst, HANDLE hPrev,
  10.                     LPSTR menu = NULL, LPSTR icon = IDI_APPLICATION,
  11.                     LPSTR cursorname = IDC_ARROW)
  12.                     :WindowRegClass("stdXXX", hInst, hPrev,
  13.                             StdWindow::WndProc) {
  14.         WinName = WinN;
  15.         hInstance = hInst;
  16.         SetClassMenu(menu);
  17.         SetClassIcon(icon);
  18.         SetClassCursor(cursorname);
  19.         Register();
  20.         Window StdWin("stdXXX",WinName,hInstance);
  21.         StdWin.SetWinStyle(WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN);
  22.         StdWin.SetWinX(100);
  23.         StdWin.SetWinY(50);
  24.         StdWin.SetWinWidth(500);
  25.         StdWin.SetWinHeight(300);
  26.         StdWin.Create();
  27.         StdWin.Display();
  28.         StdWin.Update();
  29.         StdWin.MessageLoop();
  30.     }
  31.  
  32.     static long FAR PASCAL _export WndProc(HWND,WORD,WORD,LONG);
  33. };
  34. #define SWIN_H
  35. #endif
  36.