Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.7 KiB

  1. /**************************************************/
  2. /* */
  3. /* */
  4. /* MDI Child Window (reference) */
  5. /* */
  6. /* */
  7. /* Copyright (c) 1997-1999 Microsoft Corporation. */
  8. /**************************************************/
  9. #include <afxtempl.h>
  10. class CRefrWnd : public CMDIChildWnd
  11. {
  12. DECLARE_DYNCREATE(CRefrWnd)
  13. public:
  14. CRefrWnd();
  15. BOOL Create( LPCTSTR szTitle, LONG Style, RECT ReffWndRect, CMDIFrameWnd* Parent);
  16. BOOL UpdateBitmap();
  17. void CaptionDraw();
  18. private:
  19. void DrawFreeForm( BOOL MouseSts);
  20. void SelectFreeForm( BOOL MouseSts);
  21. BOOL CreateNewBitmap();
  22. BOOL ClipPickValueInit();
  23. BOOL InitSelectLogfont();
  24. BOOL ClipImageCopy();
  25. BOOL LoadCloseBitmap();
  26. void DrawGridLine( CDC *dc);
  27. // void CaptionDraw( CDC *dc);
  28. void RubberBand( BOOL TestFlag);
  29. void RubberBandPaint( CDC *dc);
  30. void IllegalRect( PPOINT ptTL, PPOINT ptBR);
  31. void CorrectMouseDownPt( CPoint point);
  32. void CorrectMouseUpPt( CPoint point);
  33. void MoveRectangle( CPoint point);
  34. public:
  35. BOOL GridShow;
  36. WORD ReferCode;
  37. BOOL RectVisible;
  38. BOOL bFocus;
  39. int SelectItems;
  40. private:
  41. CBitmapButton CloseBtm;
  42. CBitmap ImageBmp;
  43. CDC ImageDC;
  44. BOOL IsCapture;
  45. BOOL ValidateFlag;
  46. CPoint ptStart;
  47. CPoint ptEnd;
  48. CPoint ptPrev;
  49. CPoint m_ptMouse;
  50. CPoint m_ptLast;
  51. int ZoomRate;
  52. UINT ClipboardFormat;
  53. CRect PickRect;
  54. CRect MoveRect;
  55. CRect ReffWndRect;
  56. CRgn FreeRgn, PickRgn;
  57. CArray<CPoint,CPoint> m_pointArray;
  58. CArray<CPoint,CPoint> m_selectArray;
  59. BOOL m_bCloseOnLeft;
  60. protected:
  61. virtual ~CRefrWnd();
  62. static CMenu NEAR menu;
  63. //{{AFX_MSG(CRefrWnd)
  64. afx_msg void OnClickClose();
  65. afx_msg void OnPaint();
  66. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  67. afx_msg void OnSize(UINT nType, int cx, int cy);
  68. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  69. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  70. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  71. afx_msg void OnGaijiCopy();
  72. afx_msg void OnUpdateGaijiCopy( CCmdUI* pCmdUI);
  73. afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  74. afx_msg void OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd);
  75. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  76. //afx_msg void OnActivate( UINT nState, CWnd* pWndOther, BOOL bMinimized );
  77. //afx_msg int OnMouseActivate( CWnd* pDesktopWnd, UINT nHitTest, UINT message );
  78. //}}AFX_MSG
  79. DECLARE_MESSAGE_MAP()
  80. };