home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / bpos2i.zip / BUILDPM.PAS < prev    next >
Pascal/Delphi Source File  |  1994-05-31  |  4KB  |  108 lines

  1. (* ====================================================== *)
  2. (*                         BUILDPM.PAS                    *)
  3. (*     Program to compile all toolbox-BP-OS/2-libraries   *)
  4. (*                  (C) 1994 toolbox                      *)
  5. (* ====================================================== *)
  6. (* 1. compile this program                                *)
  7. (* 2. makepm the program                                  *)
  8. (* 3. call the resource compiler: rc buildpm.rc           *)
  9. (* ... and ready                                          *)
  10. (* associated files:                                      *)
  11. (* buildpm.pas, buildpm.rc buildpm.rc and the units below *)
  12. {$A+,B-,D-,F+,G+,I-,K+,N-,P-,Q-,R-,S-,T-,V-,W-,X+,Y+}
  13. PROGRAM BuildPM;
  14.  
  15. USES
  16.   BDCalls, DevIOCtl, DosCalls, HelpMgr,  KbdCalls, MonCalls,
  17.   MouCalls, Msg, NamPipes, Nls, Os2Def, Os2Error, PMErr,
  18.   PMGpi, PmMle, PMPic, PMSPL, PMVioP, PMWin, QueCalls,
  19.   SesMgr, Strings (* by Borland *), VioCalls;
  20.  
  21. VAR
  22.   Frame, client : hWnd;
  23.   ahab          : HAB;
  24.   aMq           : hMQ;
  25.   aMsg          : QMsg;
  26.  
  27. CONST
  28.   FrameFlags   : LongInt = FCF_TITLEBAR      +
  29.                            FCF_SYSMENU       +
  30.                            FCF_MENU          +
  31.                            FCF_SIZEBORDER    +
  32.                            FCF_MINBUTTON     +
  33.                            FCF_MAXBUTTON     +
  34.                            FCF_SHELLPOSITION +
  35.                            FCF_TASKLIST      +
  36.                            FCF_ICON;
  37.  
  38.   FUNCTION ClientWndProc(Window : hWnd;
  39.                          Msg    : WORD;
  40.                          Mp1,
  41.                          Mp2    : mParam) : mResult; EXPORT;
  42.  
  43.   VAR
  44.     ps   : hPs;
  45.     rcl  : RectL;
  46.     Text : ARRAY[0..100] OF CHAR;
  47.  
  48.   BEGIN
  49.      ClientWndProc := NIL;
  50.      CASE Msg OF
  51.        WM_CREATE: Dos16Beep(200, 10);
  52.        WM_PAINT :
  53.          BEGIN
  54.            ps := WinBeginPaint(Window, NIL, NIL);
  55.            WinQueryWindowRect(Window, @rcl);
  56.            rcl.yBottom := rcl.yTop + 10;
  57.            StrCopy(Text, 'Alle OS/2-Bibliotheken wurden erzeugt!');
  58.            WinDrawText(ps, -1, Text, @rcl,
  59.                        PMGpi.CLR_BLUE,
  60.                        PMGpi.CLR_PALEGRAY,
  61.                        $8500);
  62.            StrCopy(Text, 'Um OS/2-Programme sinnvoll zu programmieren');
  63.            Inc(rcl.yBottom, 10);
  64.            Inc(rcl.yTop, 10);
  65.            WinDrawText(ps, -1, Text, @rcl,
  66.                        PMGpi.CLR_BLUE,
  67.                        PMGpi.CLR_PALEGRAY,
  68.                        $8500);
  69.            WinEndPaint(ps);
  70.          END;
  71.        WM_COMMAND :
  72.          CASE Mp1.l OF { für varianten Record Tag setzen ! }
  73.            101: Dos16Beep(4500, 40);
  74.            109: WinPostMsg(NIL, WM_QUIT, NIL, NIL);
  75.            201: WinMessageBox(Frame,
  76.                               Window,
  77.                               'Build-PM der toolbox ''94',
  78.                               'Über...',
  79.                               0,
  80.                               MB_ICONEXCLAMATION +
  81.                               MB_MOVEABLE);
  82.          END;
  83.        WM_DESTROY : Dos16Beep(500, 10);
  84.      ELSE
  85.        ClientWndProc := WinDefWindowProc(Window, Msg,
  86.                                          Mp1, Mp2);
  87.      END;
  88.   END;
  89.  
  90. BEGIN
  91.   ahab := WinInitialize(0);
  92.   aMq := WinCreateMsgQueue(ahab,0);
  93.   WinRegisterClass(ahab,'Build PM',@ClientWndProc,4,0);
  94.   Frame := WinCreateStdWindow(hWnd(1),
  95.                               WS_VISIBLE,
  96.                               FrameFlags,
  97.                               'Build PM',
  98.                               NIL, 0, 0, 1, client);
  99.   WHILE (WinGetMsg(ahab, aMsg, NIL, 0, 0)) DO
  100.     WinDispatchMsg(ahab, aMsg);
  101.   WinDestroyWindow(Frame);
  102.   WinDestroyMsgQueue(aMq);
  103.   WinTerminate(ahab);
  104. END.
  105.  
  106. (* ====================================================== *)
  107. (*                 Ende von BUILDPM.PAS                   *)
  108.