Update the changelog
[opencv] / apps / Common / DWnd.h
1 /*M///////////////////////////////////////////////////////////////////////////////////////\r
2 //\r
3 //  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\r
4 //\r
5 //  By downloading, copying, installing or using the software you agree to this license.\r
6 //  If you do not agree to this license, do not download, install,\r
7 //  copy or use the software.\r
8 //\r
9 //\r
10 //                        Intel License Agreement\r
11 //                For Open Source Computer Vision Library\r
12 //\r
13 // Copyright (C) 2000, Intel Corporation, all rights reserved.\r
14 // Third party copyrights are property of their respective owners.\r
15 //\r
16 // Redistribution and use in source and binary forms, with or without modification,\r
17 // are permitted provided that the following conditions are met:\r
18 //\r
19 //   * Redistribution's of source code must retain the above copyright notice,\r
20 //     this list of conditions and the following disclaimer.\r
21 //\r
22 //   * Redistribution's in binary form must reproduce the above copyright notice,\r
23 //     this list of conditions and the following disclaimer in the documentation\r
24 //     and/or other materials provided with the distribution.\r
25 //\r
26 //   * The name of Intel Corporation may not be used to endorse or promote products\r
27 //     derived from this software without specific prior written permission.\r
28 //\r
29 // This software is provided by the copyright holders and contributors "as is" and\r
30 // any express or implied warranties, including, but not limited to, the implied\r
31 // warranties of merchantability and fitness for a particular purpose are disclaimed.\r
32 // In no event shall the Intel Corporation or contributors be liable for any direct,\r
33 // indirect, incidental, special, exemplary, or consequential damages\r
34 // (including, but not limited to, procurement of substitute goods or services;\r
35 // loss of use, data, or profits; or business interruption) however caused\r
36 // and on any theory of liability, whether in contract, strict liability,\r
37 // or tort (including negligence or otherwise) arising in any way out of\r
38 // the use of this software, even if advised of the possibility of such damage.\r
39 //\r
40 //M*/// Camera.h: interface for the CCamera class.\r
41 //\r
42 //////////////////////////////////////////////////////////////////////\r
43 \r
44 #if !defined(AFX_DWND_H__36BABB11_EBA3_11D3_A294_00105A717188__INCLUDED_)\r
45 #define AFX_DWND_H__36BABB11_EBA3_11D3_A294_00105A717188__INCLUDED_\r
46 \r
47 #if _MSC_VER > 1000\r
48 #pragma once\r
49 #endif // _MSC_VER > 1000\r
50 // DWnd.h : header file\r
51 //\r
52 #include "Image.h"\r
53 \r
54 /////////////////////////////////////////////////////////////////////////////\r
55 // CDWnd window\r
56 \r
57 class CDWnd : public CWnd\r
58 {\r
59 // Construction\r
60 public:\r
61         CDWnd();\r
62 \r
63 // Attributes\r
64 public:\r
65     double m_IWK[2];\r
66     double m_WIK[2];\r
67 \r
68 // Operations\r
69 public:\r
70     CWnd* m_FatherWnd;\r
71 \r
72 // Overrides\r
73         // ClassWizard generated virtual function overrides\r
74         //{{AFX_VIRTUAL(CDWnd)\r
75         //}}AFX_VIRTUAL\r
76 \r
77 // Implementation\r
78 public:\r
79         virtual ~CDWnd();\r
80 \r
81   /* interface */\r
82     BOOL       CreateWnd( CWnd* pParent, \r
83                           char* pName   = "Data", \r
84                           long  lWidth  = 320, \r
85                           long  lHeight = 240,\r
86                           long  lBPP    = 24 );\r
87     void       DrawIplImage( IplImage* pImage, BOOL bSetChannelNumber = TRUE );\r
88     void       Invalidate( BOOL bErase = TRUE )\r
89                     {if(::IsWindow(m_hWnd))CWnd::Invalidate( bErase );}\r
90     CDC*       GetDC(){return ::IsWindow(m_hWnd) ? CWnd::GetDC() : NULL;}\r
91     HDC        GetMemHDC() {return ::IsWindow(m_hWnd) ? m_Image.GetDC() : NULL;}\r
92     IplImage*  GetImage() {return m_Image.GetImage();}\r
93     CImage     m_Image;\r
94     virtual BOOL ReDraw( CDC *pDC = NULL );\r
95     BOOL       DrawToHDC( HDC hDCDst, RECT* pDstRect = NULL );\r
96 \r
97   // Generated message map functions\r
98 protected:\r
99 \r
100 \r
101   //{{AFX_MSG(CDWnd)\r
102         afx_msg void OnPaint();\r
103         afx_msg void OnSizing(UINT fwSide, LPRECT pRect);\r
104         afx_msg void OnSize(UINT nType, int cx, int cy);\r
105         afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);\r
106         //}}AFX_MSG\r
107         DECLARE_MESSAGE_MAP()\r
108 };\r
109 \r
110 /////////////////////////////////////////////////////////////////////////////\r
111 \r
112 //{{AFX_INSERT_LOCATION}}\r
113 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
114 \r
115 #endif // !defined(AFX_DWND_H__36BABB11_EBA3_11D3_A294_00105A717188__INCLUDED_)\r
116 \r
117 /* End of file. */\r