home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 22 / SOLO_22.iso / packages / win32ada / data.z / aliaspkg.ads < prev    next >
Encoding:
Text File  |  1996-03-15  |  3.4 KB  |  90 lines

  1. -- $Source: /home/harp/1/proto/monoBANK/winnt/aliaspkg.ads,v $ 
  2. -- $Revision: 1.2 $ $Date: 96/03/15 13:51:58 $ $Author: stm $ 
  3. -- $Id: pcx.adb 1.5 1995/02/08 18:30:27 mps Exp mps $
  4. --
  5. --   PROGRAM: pcx.adb 
  6. --
  7. --   PURPOSE: Provide display of PCX files
  8. -- 
  9. --   COMMENTS:
  10. --   The LabTek PCX Application Example is a sample application
  11. --   that you can use to get an idea of how to perform some of the simple
  12. --   functionality that the Windows GDI API implements.
  13. --   Note that no 'use' clauses were used to help get a better idea on where 
  14. --   various type are located in the binding.  Readability improves greatly
  15. --   once a 'use Win32;' is used.
  16. --
  17. --   NOTES:
  18. --   There is currently no help file.
  19. --   pcxops.adb uses Unix style opens and reads instead of the Win32 variants.
  20. --
  21.  
  22. with Interfaces.C;
  23. with Win32.Winuser;
  24. with Win32.Windef;
  25.  
  26. package AliasPkg is
  27.  
  28.     function CP(S: Win32.CHAR_Array) return Win32.LPCSTR; -- utility function
  29.  
  30.  
  31.     FILE_DISPLAYED   : BOOLEAN;                   -- is PCX file displayed?
  32.     HINST            : Win32.WinDef.HINSTANCE;    -- current instance
  33.     IRESULT          : Win32.INT;                 -- temp to hold results 
  34.     PCXFILENAME      : Win32.LPCSTR;              -- ptr to PCX file
  35.     
  36.  
  37.     -- aliased for procedure pcx
  38.     appname      : aliased constant Win32.CHAR_Array := "pcx";
  39.     szappname    : constant Win32.LPCSTR := CP(appname);
  40.  
  41.     -- aliased for function WndProc
  42.     aboutbox     : aliased constant Win32.CHAR_Array := "ABOUTBOX";
  43.     RECT         : aliased Win32.WinDef.RECT;
  44.     CURSOR_RECT  : aliased Win32.WinDef.RECT;
  45.     TL_POINT     : aliased Win32.WinDef.POINT;
  46.     BR_POINT     : aliased Win32.WinDef.POINT;
  47.     HELP_STR     : aliased Win32.CHAR_Array(0..255);
  48.  
  49.  
  50.     -- aliased for function InitApplication
  51.     WC : aliased Win32.WinUser.WNDCLASS;
  52.  
  53.     -- aliased for function InitApplication
  54.     pcxTitle: aliased constant Win32.CHAR_Array := "PCX Sample Application";
  55.  
  56.  
  57.  
  58.     function WndProc(HWND    : Win32.WinDef.HWND;
  59.                      MESSAGE : Win32.UINT;
  60.                      WPARAM  : Win32.WPARAM;
  61.                      LPARAM  : Win32.LPARAM) return Win32.LRESULT;
  62.     pragma Convention(Stdcall, WndProc);
  63.  
  64.     function About(hDlg    : Win32.WinDef.HWND;
  65.                    MESSAGE : Win32.UINT;
  66.                    WPARAM  : Win32.WPARAM;
  67.                    LPARAM  : Win32.LPARAM) return Win32.BOOL;
  68.     pragma Convention (Stdcall, About);
  69.  
  70. -------------------------------------------------------------------------------
  71. --
  72. -- THIS FILE AND ANY ASSOCIATED DOCUMENTATION IS PROVIDED WITHOUT CHARGE
  73. -- "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
  74. -- BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
  75. -- FITNESS FOR A PARTICULAR PURPOSE.  The user assumes the entire risk as to
  76. -- the accuracy and the use of this file.  This file may be used, copied,
  77. -- modified and distributed only by licensees of Microsoft Corporation's
  78. -- WIN32 Software Development Kit in accordance with the terms of the 
  79. -- licensee's End-User License Agreement for Microsoft Software for the
  80. -- WIN32 Development Kit.
  81. --
  82. -- Copyright (c) Intermetrics, Inc. 1995
  83. -- Portions (c) 1985-1994 Microsoft Corporation with permission.
  84. -- Microsoft is a registered trademark and Windows and Windows NT are
  85. -- trademarks of Microsoft Corporation.
  86. --
  87. -------------------------------------------------------------------------------
  88.  
  89. end AliasPkg;
  90.