// paintView.h : CpaintView 클래스의 인터페이스
//
#include "data.h"


#pragma once


class CpaintView : public CView
{
protected: // serialization에서만 만들어집니다.
	CpaintView();
	DECLARE_DYNCREATE(CpaintView)

// 특성입니다.
public:
	CpaintDoc* GetDocument() const;

// 작업입니다.
public:

	CData* m_pDrawList;

	COLORREF m_textColor;
	LOGFONT m_logFont;

	CRectTracker m_tracker;
	CPoint m_ptStart;
    CPoint m_ptEnd;
	int mode1;
	int m_nlineCnt; 
	char str;
	void drawpieUp();
	void drawpieMove();

	BOOL m_bLButtonDown;
	BOOL m_bDrawMode;
	void drawRectMove(CPoint &point);
	void drawElliMove(CPoint &point);
	void drawlineMove(CPoint &point);
	void OnUpdate(CView* pSender,LPARAM lHint,CObject* pHint);
	void OnChangeTool(UINT nID);
	void Colorchoice();

	CPoint m_ptPrev; //이전점
	COLORREF m_penColor;
	COLORREF m_penRGB;
	COLORREF m_brush;
	COLORREF m_ptrcolor;
	int m_LineSize2;
	BOOL OnSetCursor(CWnd* pWnd,UINT nHitTest,UINT message);
	void OnUpdateChangeTool(CCmdUI* pCmdUI);
	BOOL m_bcli;
// 재정의입니다.

private:
	CDC* m_memDC;	
	CBitmap *m_bitmap, *m_oldBitmap;
	CRect	 m_rect;


public:
	virtual void OnDraw(CDC* pDC);  // 이 뷰를 그리기 위해 재정의되었습니다.
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	void DrawNode();
protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	void OnInitialUpdate();
// 구현입니다.
public:
	virtual ~CpaintView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// 생성된 메시지 맵 함수
protected:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnSELECT();
	afx_msg void OnLINE();
	afx_msg void OnRECT();
	afx_msg void OnELLI();
	afx_msg void On32787();
	afx_msg void On11();
	afx_msg void On12();
	afx_msg void On110();
	afx_msg void OnBtnLinergb();

	afx_msg void OnBtnPlus();
	afx_msg void OnBtnMinus();
	afx_msg void OnBtnZero();
	afx_msg void OnSTR_1();
	afx_msg void OnSTR_2();
	afx_msg void OnSTR_3();
	afx_msg void OnSTR_4();
	afx_msg void OnSTR_5();
	afx_msg void OnSTR_6();
	//afx_msg void OnSTR_7();
	afx_msg void OnSTR_8();
	afx_msg void OnSTR_9();
	//afx_msg void On32855();
	afx_msg void OnUpdateSTR_1(CCmdUI *pCmdUI);
	afx_msg void OnUpdateLine(CCmdUI *pCmdUI);
	afx_msg void OnUpdateSelect(CCmdUI *pCmdUI);
	afx_msg void OnUpdateRECT(CCmdUI *pCmdUI);
	afx_msg void OnUpdateMenu(CCmdUI *pCmdUI);
	afx_msg void OnUpdateELLI(CCmdUI *pCmdUI);
	afx_msg void OnBtnptrgb();
	afx_msg void OnStr7();
	afx_msg void OnStr10();
	afx_msg void OnPoly();
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnUpdatePoly(CCmdUI *pCmdUI);
	
};

#ifndef _DEBUG  // paintView.cpp의 디버그 버전
inline CpaintDoc* CpaintView::GetDocument() const
   { return reinterpret_cast<CpaintDoc*>(m_pDocument); }
#endif

