home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / directx2 / sdk / samples / dxview / dxview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-28  |  3.1 KB  |  98 lines

  1. //================================================================
  2. // Defines
  3. //================================================================
  4.  
  5. // Window Width and Height
  6. #define DXView_WIDTH       640
  7. #define DXView_HEIGHT      300
  8.  
  9. // Child controls
  10. #define IDC_LV          0x2000
  11. #define IDC_TV          0x2003
  12.  
  13. // Imagelist first and last icons
  14. #define IDI_FIRSTIMAGE  IDI_DIRECTX
  15. #define IDI_LASTIMAGE   IDI_CAPSOPEN
  16.  
  17. #define IDC_SPLIT                       100
  18.  
  19. #define IDM_EXIT                        40001
  20. #define IDM_ABOUT                       40002
  21. #define IDM_VIEWAVAIL                   40003
  22. #define IDM_VIEWALL                     40004
  23.  
  24. #define IDI_DIRECTX                     100
  25. #define IDI_CAPS                        101
  26. #define IDI_CAPSOPEN                    102
  27.  
  28. //================================================================
  29. // Typedefs
  30. //================================================================
  31.  
  32. typedef void (*SELCALLBACK)(LPARAM lParam1, LPARAM lParam2);
  33.  
  34. typedef struct
  35. {
  36.     SELCALLBACK Callback;
  37.     LPARAM lParam1;
  38.     LPARAM lParam2;
  39. } NODEINFO;
  40.  
  41. typedef struct
  42. {
  43.     char *  szName;         // name of cap
  44.     DWORD   dwOffset;       // offset to cap
  45.     DWORD   dwFlag;         // bit flag for cal
  46. } CAPDEF;
  47.  
  48. typedef struct
  49. {
  50.     char *szName;         // name of cap
  51.     SELCALLBACK Callback;
  52.     LPARAM lParam2;
  53. } CAPDEFS;
  54.  
  55. typedef struct
  56. {
  57.         D3DDEVICEDESC d3dDeviceDesc;
  58.         GUID  guid;
  59. } CAP3DDEVICEDESC;
  60.  
  61. //================================================================
  62. // Function prototypes
  63. //================================================================
  64.  
  65. LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  66. LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  67.  
  68. BOOL InitInstance(HINSTANCE hInstance, LPSTR lpCmdLine, int nCmdShow, int iWidth, int iHeight);
  69.  
  70. BOOL DXView_OnCreate(HWND hwnd);
  71. void DXView_OnCommand(HWND hwnd, WPARAM wParam);
  72. void DXView_OnSize(HWND hwnd);
  73. void DXView_OnTreeSelect(HWND hwndTV, NM_TREEVIEW *ptv);
  74. void DXView_OnListViewDblClick(HWND hwndLV, NM_LISTVIEW *plv);
  75. void DXView_Cleanup(void);
  76. void DXView_FillTree(HWND hwndTV);
  77. BOOL DXView_InitImageList(void);
  78.  
  79. void LVAddColumn(HWND hwndLV, int i, char *name, int width);
  80. int  LVAddText(HWND hwndLV, int col, char *sz, ...);
  81. HTREEITEM TVAddNode(HTREEITEM hParent, char *szText, BOOL fKids, int iImage, SELCALLBACK Callback, LPARAM lParam1, LPARAM lParam2);
  82.  
  83. void DDAddCaps(LPARAM lParam1, LPARAM lParam2);
  84. void DSAddCaps(LPARAM lParam1, LPARAM lParam2);
  85. void DPAddCaps(LPARAM lParam1, LPARAM lParam2);
  86. void D3AddCaps(LPARAM lParam1, LPARAM lParam2);
  87. void DDAddVideoModes(LPARAM lParam1, LPARAM lParam2);
  88. void DPAddSessions(LPARAM lParam1, LPARAM lParam2);
  89. void DDFourCCFormat(LPARAM lParam1, LPARAM lParam2);
  90.  
  91. HRESULT CALLBACK D3EnumCallback(
  92.             LPGUID pid,
  93.             LPSTR lpDriverDesc,
  94.             LPSTR lpDriverName, 
  95.             LPD3DDEVICEDESC lpD3DDeviceDesc1, 
  96.             LPD3DDEVICEDESC lpD3DDeviceDesc2, 
  97.             LPVOID lpContext);
  98.