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 doBmpTest
00087 ( int Width,
00088 int Height,
00089 const PLPixelFormat& pf,
00090 int ID
00091 );
00092
00093
00094
00095 PLDIBSection * m_pBmp;
00096 PLWinBmp * m_pBigBmp;
00097
00098 CMTDIBWnd * m_pDIBWnd;
00099
00100 CString m_sDirName;
00101
00102 CRITICAL_SECTION m_Critical;
00103 CWinThread * m_pThread;
00104 bool m_bStopDecoding;
00105 CCriticalSection * m_pThreadCritical;
00106
00107 #ifdef TEST_DDRAW
00108 IDirectDraw * m_pDDraw;
00109 #endif
00110 };
00111
00112
00113
00114