Leaked source code of windows server 2003
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.

131 lines
3.7 KiB

  1. //
  2. // Copyright (c) 1997-1999 Microsoft Corporation.
  3. //
  4. #include <afxtempl.h>
  5. class CEditWnd : public CMDIChildWnd
  6. {
  7. DECLARE_DYNCREATE(CEditWnd)
  8. public:
  9. CEditWnd();
  10. int SaveEUDCCode(UINT msgBoxType);
  11. void CallCharTextOut();
  12. void SetDuplicateRect( RECT *rect, POINT *point);
  13. void FlipRotate( int RadioItem);
  14. void WriteSelRectBitmap();
  15. BOOL SelectCodes();
  16. BOOL UpdateBitmap();
  17. BOOL GetBitmapDirty();
  18. BOOL SetBitmapDirty( BOOL Flg);
  19. BOOL Create( LPCTSTR szTitle, LONG Style,
  20. RECT EudcWndRect, CMDIFrameWnd* Parent);
  21. virtual ~CEditWnd();
  22. void CaptionDraw();
  23. private:
  24. BOOL MoveClipRect();
  25. void RotateFigure90( LPBYTE pBuf1, LPBYTE pBuf2, int bWid, int bHgt);
  26. void RotateFigure270( LPBYTE pBuf1, LPBYTE pBuf2,int bWid, int bHgt);
  27. void DrawGridLine( CDC *dc);
  28. void DrawMoveRect( CDC *dc);
  29. void DrawStretchRect( CDC *dc);
  30. BOOL CurveFittingDraw( CDC *dc);
  31. void CorrectMouseDownPoint( CPoint point);
  32. void CorrectMouseUpPoint( CPoint point);
  33. void DrawClipBmp();
  34. void UndoImageDraw();
  35. void EraseRectangle();
  36. void EraseFreeForm();
  37. BOOL SetFreeForm();
  38. void ZoomPoint( CPoint *DrawPt, int x, int y);
  39. void IllegalRect( PPOINT ptTL, PPOINT ptBR);
  40. void DrawFreeForm( BOOL MouseSts);
  41. void SelectFreeForm( BOOL MouseSts);
  42. void ToolInit( int LRButton);
  43. void ToolTerm();
  44. void DrawRubberBand( BOOL StretchFlag);
  45. void SetMoveRect();
  46. void SetValidRect();
  47. void SetPickRect();
  48. void SetClickRect();
  49. void StretchMoveRect();
  50. void DrawRectBmp();
  51. void DrawPoint( CPoint Pt, BOOL bErase);
  52. void DrawToPoint(BOOL bErase);
  53. void InitFlipRotate( CDC *RotateDC, CBitmap *RotateBMP);
  54. BOOL DrawStretchClipToDisp();
  55. BOOL CreateNewBitmap();
  56. BOOL CreateUndoBitmap();
  57. BOOL ClipPickValueInit();
  58. BOOL InitEditLogfont();
  59. BOOL ClipImageCopy();
  60. BOOL ClipImageCut();
  61. int CheckClipRect( POINT ClickPoint);
  62. private:
  63. CBitmap UndoImage;
  64. CBitmap CRTDrawBmp;
  65. CBitmap ImageBmp;
  66. CDC CRTDrawDC;
  67. CDC ImageDC;
  68. BOOL BitmapDirty;
  69. BOOL RectClipFlag;
  70. BOOL UndoBitmapFlag;
  71. BOOL IsCapture;
  72. BOOL ButtonFlag;
  73. UINT ClipboardFormat;
  74. int Ratio;
  75. int CheckNum;
  76. int BrushWidth;
  77. CArray<CPoint,CPoint> m_pointArray;
  78. CArray<CPoint,CPoint> m_SelectArray;
  79. CRgn FreeRgn;
  80. CRgn PickRgn;
  81. CPoint ptStart;
  82. CPoint ptPrev;
  83. CPoint ptEnd;
  84. CRect PickRect[8];
  85. CRect ClipRect[5];
  86. CRect EudcWndRect;
  87. public:
  88. TCHAR SelectFont[40];
  89. int SelectItem;
  90. int ZoomRate;
  91. WORD UpdateCode;
  92. BOOL GridShow;
  93. WORD CallCode;
  94. BOOL FlagTmp;
  95. BOOL bFocus;
  96. protected:
  97. static CMenu NEAR menu;
  98. //{{AFX_MSG(CEditWnd)
  99. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  100. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  101. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  102. afx_msg void OnPaint();
  103. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  104. afx_msg void OnGaijiCopy();
  105. afx_msg void OnGaijiCut();
  106. afx_msg void OnGaijiPaste();
  107. afx_msg void OnGaijiUndo();
  108. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  109. afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
  110. afx_msg void OnSize(UINT nType, int cx, int cy);
  111. afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  112. afx_msg void OnUpdateGaijiPaste(CCmdUI* pCmdUI);
  113. afx_msg void OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd);
  114. afx_msg void OnUpdateGaijiCopy(CCmdUI* pCmdUI);
  115. afx_msg void OnUpdateGaijiCut(CCmdUI* pCmdUI);
  116. afx_msg void OnDeleteEdit();
  117. afx_msg void OnUpdateDeleteEdit(CCmdUI* pCmdUI);
  118. afx_msg void OnUpdateGaijiUndo(CCmdUI* pCmdUI);
  119. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  120. afx_msg void OnClose();
  121. //}}AFX_MSG
  122. DECLARE_MESSAGE_MAP()
  123. };
  124. /////////////////////////////////////////////////////////////////////////////