1 // dxtex.h : main header file for the DXTEX application
4 #if !defined(AFX_DXTX_H__712C53C7_D63B_11D1_A8B5_00C04FC2DC22__INCLUDED_)
5 #define AFX_DXTX_H__712C53C7_D63B_11D1_A8B5_00C04FC2DC22__INCLUDED_
9 #endif // _MSC_VER > 1000
12 #error include 'stdafx.h' before including this file for PCH
15 #include "resource.h" // main symbols
18 #define ReleasePpo(ppo) \
21 (*(ppo))->Release(); \
27 /////////////////////////////////////////////////////////////////////////////
29 // I override this class to customize DoPromptFileName to allow importing of
30 // BMPs as well as DDSs into CDxtexDocs.
32 class CDxtexDocManager
: public CDocManager
35 virtual BOOL
DoPromptFileName(CString
& fileName
, UINT nIDSTitle
,
36 DWORD lFlags
, BOOL bOpenFileDialog
, CDocTemplate
* pTemplate
);
39 /////////////////////////////////////////////////////////////////////////////
40 // CDxtexCommandLineInfo:
41 // I override this class to handle custom command-line options
43 class CDxtexCommandLineInfo
: public CCommandLineInfo
46 CString m_strFileNameAlpha
;
47 CString m_strFileNameSave
;
52 CDxtexCommandLineInfo::CDxtexCommandLineInfo(VOID
);
53 virtual void ParseParam(const TCHAR
* pszParam
, BOOL bFlag
, BOOL bLast
);
57 /////////////////////////////////////////////////////////////////////////////
59 // See dxtex.cpp for the implementation of this class
62 class CDxtexApp
: public CWinApp
67 LPDIRECT3D9
Pd3d(VOID
) { return m_pd3d
; }
68 LPDIRECT3DDEVICE9
Pd3ddev(VOID
) { return m_pd3ddev
; }
69 BOOL
HandlePossibleLostDevice(VOID
);
70 VOID
DeviceIsLost(VOID
) { m_bDeviceLost
= TRUE
; }
71 HRESULT
InvalidateDeviceObjects(VOID
);
72 HRESULT
RestoreDeviceObjects(VOID
);
75 // ClassWizard generated virtual function overrides
76 //{{AFX_VIRTUAL(CDxtexApp)
78 virtual BOOL
InitInstance();
82 //{{AFX_MSG(CDxtexApp)
83 afx_msg
void OnAppAbout();
84 // NOTE - the ClassWizard will add and remove member functions here.
85 // DO NOT EDIT what you see in these blocks of generated code !
90 LPDIRECT3DDEVICE9 m_pd3ddev
;
95 /////////////////////////////////////////////////////////////////////////////
97 //{{AFX_INSERT_LOCATION}}
98 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
100 #endif // !defined(AFX_DXTX_H__712C53C7_D63B_11D1_A8B5_00C04FC2DC22__INCLUDED_)