00001 #if !defined(AFX_FRACWND_H__AA4A322A_6E3B_4BFB_9D90_968EAB3E75AE__INCLUDED_)
00002 #define AFX_FRACWND_H__AA4A322A_6E3B_4BFB_9D90_968EAB3E75AE__INCLUDED_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if _MSC_VER > 1000
00023 #pragma once
00024 #endif // _MSC_VER > 1000
00025
00027
00028
00029 class FractalImage ;
00030 class Palette ;
00031
00032
00037 class CFracWnd : public CWnd
00038 {
00039
00040 public:
00041 CFracWnd();
00042
00043
00044 public:
00045 void set_image (FractalImage*) ;
00046
00047
00048 public:
00049
00050
00051
00052
00053
00054
00055
00056 public:
00057 virtual ~CFracWnd();
00058
00059
00060 protected:
00061
00062 afx_msg void OnPaint();
00063 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00064 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00065 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00066 afx_msg void OnSize(UINT nType, int cx, int cy);
00067
00068 DECLARE_MESSAGE_MAP()
00069
00070 private:
00071 void update_bitmap (void) ;
00072 void construct (CDC* p_dc, int width, int height) ;
00073 void draw_cbitmap (CDC* p_dc,
00074 const CRect& image_rect_v,
00075 HBITMAP bitmap, DWORD rasterop) ;
00076 void zoom_in (const CRect&) ;
00077
00078 private:
00080 FractalImage* m_image ;
00081
00083 HBITMAP m_rgb_bitmap ;
00084
00085
00086 CPoint m_mouse_down ;
00087 CPoint m_mouse_curr ;
00088 bool m_in_drag ;
00089 };
00090
00092
00093
00094
00095
00096 #endif // !defined(AFX_FRACWND_H__AA4A322A_6E3B_4BFB_9D90_968EAB3E75AE__INCLUDED_)