home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1991 / 06 / praxis / listing6.pas < prev    next >
Pascal/Delphi Source File  |  1991-03-12  |  1KB  |  38 lines

  1. (* ------------------------------------------------------ *)
  2. (*                     LISTING.6                          *)
  3. (*             (c) 1991 Borland International             *)
  4. (* ------------------------------------------------------ *)
  5.  
  6. { CRT window procedure }
  7.  
  8.   FUNCTION CrtWinProc(Window : HWnd; Message, WParam : WORD;
  9.                       LParam : LONGINT) : LONGINT;
  10.   BEGIN
  11.     CrtWinProc := 0;
  12.     CrtWindow  := Window;
  13.     CASE Message OF
  14.       wm_Create        : WindowCreate;
  15.       wm_Paint         : WindowPaint;
  16.       wm_VScroll       : WindowScroll(sb_Vert, WParam,
  17.                                       LongRec(LParam).Lo);
  18.       wm_HScroll       : WindowScroll(sb_Horz, WParam,
  19.                                       LongRec(LParam).Lo);
  20.       wm_Size          : WindowResize(LongRec(LParam).Lo,
  21.                                       LongRec(LParam).Hi);
  22.       wm_GetMinMaxInfo : WindowMinMaxInfo
  23.                                       (PMinMaxInfo(LParam));
  24.       wm_Char          : WindowChar(CHAR(WParam));
  25.       wm_KeyDown       : WindowKeyDown(BYTE(WParam));
  26.       wm_SetFocus      : WindowSetFocus;
  27.       wm_KillFocus     : WindowKillFocus;
  28.       wm_Destroy       : WindowDestroy;
  29.     ELSE
  30.       CrtWinProc := DefWindowProc(Window, Message,
  31.                                   WParam, LParam);
  32.     END;
  33.   END;
  34.  
  35. (* ------------------------------------------------------ *)
  36. (*              Ende von LISTING.6                        *)
  37.  
  38.