00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include <afxmt.h>
00012
00013 #include "plwinbmp.h"
00014 #include "mtdibwnd.h"
00015 #include "plpicdec.h"
00016 #include "pldibsect.h"
00017
00018 #ifdef TEST_DDRAW
00019 #include <ddraw.h>
00020 #endif
00021
00022 class CDibtestDlg : public CDialog
00023 {
00024
00025 public:
00026 CDibtestDlg
00027 ( char * pszDirName
00028 );
00029
00030 ~CDibtestDlg
00031 ();
00032
00033 void DoWork
00034 ();
00035
00036
00037
00038 enum { IDD = IDD_DIBTEST_DIALOG };
00039
00040
00041
00042
00043
00044 protected:
00045 virtual void DoDataExchange(CDataExchange* pDX);
00046
00047
00048
00049 protected:
00050 HICON m_hIcon;
00051
00052
00053
00054 virtual BOOL OnInitDialog();
00055 afx_msg void OnPaint();
00056 afx_msg HCURSOR OnQueryDragIcon();
00057 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00058 afx_msg void OnDestroy();
00059 afx_msg void OnMove(int x, int y);
00060 afx_msg void OnSize(UINT nType, int cx, int cy);
00061
00062 DECLARE_MESSAGE_MAP()
00063
00064 private:
00065 void displayDir
00066 ( PLPicDecoder * pDecoder,
00067 const char * pszDirName
00068 );
00069
00070
00071
00072 void displayFilesInDir
00073 ( PLPicDecoder * pDecoder,
00074 const char * pszDirName,
00075 const char * pszFName
00076 );
00077
00078
00079
00080 void displayFile
00081 ( PLPicDecoder * pDecoder,
00082 char * pszFName
00083 );
00084
00085
00086 void doCreateCopyTest
00087 ( PLPicDecoder * pDecoder
00088 );
00089
00090 void doBmpTest
00091 ( int Width,
00092 int Height,
00093 int bpp,
00094 int ID
00095 );
00096
00097
00098
00099 PLDIBSection * m_pBmp;
00100 PLWinBmp * m_pBigBmp;
00101
00102 CMTDIBWnd * m_pDIBWnd;
00103
00104 CString m_sDirName;
00105
00106 CRITICAL_SECTION m_Critical;
00107 CWinThread * m_pThread;
00108 bool m_bStopDecoding;
00109 CCriticalSection * m_pThreadCritical;
00110
00111 #ifdef TEST_DDRAW
00112 IDirectDraw * m_pDDraw;
00113 #endif
00114 };
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130