home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / PVIEW95.PAK / LISTVIEW.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  2.3 KB  |  80 lines

  1. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  2. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  3. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  4. // PARTICULAR PURPOSE.
  5. //
  6. // Copyright (C) 1993-1995  Microsoft Corporation.  All Rights Reserved.
  7. //
  8. // PURPOSE:
  9. //    Contains declarations for list view creation and manipulation functions.
  10.  
  11.  
  12. //-------------------------------------------------------------------------
  13. // Manifest constants
  14.  
  15. #define ID_LISTVIEW     201
  16. #define CPROCESSCOLUMNS 6
  17. #define CTHREADCOLUMNS  3
  18. #define C_COLUMNS       3
  19.  
  20. #define EXETYPE_32BIT   32      // Executable type either 16 or 32 bits
  21. #define EXETYPE_16BIT   16
  22.  
  23.  
  24. //-------------------------------------------------------------------------
  25. // Type definitions
  26.  
  27. typedef struct tagPINFO
  28. {
  29.     char  szModName[256];
  30.     DWORD pid;
  31.     DWORD dwPriorityClass;   // Stores priority class of process
  32.     LONG  pcPriClassBase;    // Stores base priority of process
  33.     DWORD cntThreads;
  34.     UINT  uAppType; 
  35.     char  szFullPath[_MAX_PATH];
  36. } PINFO, *PPINFO;
  37.  
  38. typedef struct tagTINFO
  39. {
  40.     DWORD tid;
  41.     DWORD pidOwner;
  42.     LONG  tpBasePri;
  43.     LONG  tpDeltaPri;
  44. } TINFO, *PTINFO;
  45.  
  46.  
  47. typedef struct tagSORTINFO 
  48. {
  49.     int idFrom;
  50.     int iSubItem;
  51. } SORTINFO, *PSORTINFO;
  52.  
  53.  
  54. typedef struct tagAPPCOLUMNDEF
  55. {
  56.     WORD idString;
  57.     WORD cxColumn;
  58. } APPCOLUMNDEF;
  59.  
  60.  
  61. //-------------------------------------------------------------------------
  62. // Function prototypes.
  63.  
  64. HWND CreateListView(HWND, DWORD dwStyle, APPCOLUMNDEF acd[], UINT, UINT);
  65. BOOL WINAPI ListView_InitColumns(HWND, APPCOLUMNDEF acd[], UINT);
  66. BOOL AddProcessItem(HWND, PINFO);
  67. BOOL AddThreadItem(HWND, TINFO);
  68. LRESULT ListView_OnGetDispInfo(int idFrom, LV_DISPINFO *plvdi);
  69. LRESULT ListView_OnClick(int idFrom, NM_LISTVIEW *pnmlv);
  70. LRESULT ListView_OnDeleteItem(int idFrom, NM_LISTVIEW *pnmlv);
  71. LRESULT ListView_OnColumnClick(int idFrom, NM_LISTVIEW *pnmlv);
  72. int CALLBACK ListView_CompareProc(LPARAM lParam1, LPARAM lParam2, 
  73.                                   LPARAM lParamSort);
  74. DWORD ListView_GetSelectedPid(HWND hwndLV, LPSTR lpszPath, int cch);
  75. LRESULT CALLBACK LV_Subclass(HWND, UINT, WPARAM, LPARAM);
  76.  
  77. extern APPCOLUMNDEF acdProcess[];
  78. extern APPCOLUMNDEF acdThread[];
  79. extern FARPROC g_lpfnThreadListView;
  80.