mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-29 15:11:48 +00:00
48 lines
822 B
C
48 lines
822 B
C
|
//////////////////////////////////////////////////////
|
||
|
// View.h
|
||
|
// Declaration of the CView class
|
||
|
|
||
|
|
||
|
#ifndef VIEW_H
|
||
|
#define VIEW_H
|
||
|
|
||
|
|
||
|
#include "WinCore.h"
|
||
|
#include <vector>
|
||
|
|
||
|
using std::vector;
|
||
|
|
||
|
|
||
|
class CView : public CWnd
|
||
|
{
|
||
|
public:
|
||
|
CView();
|
||
|
virtual ~CView();
|
||
|
|
||
|
protected:
|
||
|
virtual void OnDraw(CDC* pDC);
|
||
|
virtual void PreCreate(CREATESTRUCT &cs);
|
||
|
virtual void PreRegisterClass(WNDCLASS &wc);
|
||
|
virtual LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||
|
|
||
|
private:
|
||
|
struct PlotPoint
|
||
|
{
|
||
|
int x;
|
||
|
int y;
|
||
|
bool PenDown;
|
||
|
};
|
||
|
|
||
|
void DrawLine(int x, int y);
|
||
|
void OnLButtonDown(LPARAM lParam);
|
||
|
void OnLButtonUp(LPARAM lParam);
|
||
|
void OnMouseMove(WPARAM wParam, LPARAM lParam);
|
||
|
void StorePoint(int x, int y, bool PenDown);
|
||
|
|
||
|
CBrush m_Brush;
|
||
|
vector<PlotPoint> m_points; // Points of lines to draw
|
||
|
};
|
||
|
|
||
|
|
||
|
#endif // CVIEW_H
|