Update-Installer/external/win32cpp/WCE samples/Scribble/MainFrm.h
Robert Knight d16da069e9 Add Win++ library to external
This is a thin wrapper around the Win32 API used in the Win32
Updater Dialog implementation.
2011-08-23 19:54:52 +01:00

42 lines
906 B
C++

#ifndef VIEW_H
#define VIEW_H
#include "wincore.h"
#include "wceframe.h"
#include "dialog.h"
#include <vector>
class CMainFrame : public CWceFrame
{
public:
CMainFrame();
virtual ~CMainFrame() {}
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
virtual void OnInitialUpdate();
virtual void SetPen(COLORREF Color);
protected:
virtual void DrawLine(short x, short y);
virtual void OnDraw(CDC* pDC);
virtual void OnLButtonDown(WPARAM wParam, LPARAM lParam);
virtual void OnLButtonUp(WPARAM wParam, LPARAM lParam);
virtual void OnMouseMove(WPARAM wParam, LPARAM lParam);
virtual void StorePoint(int x, int y, bool PenDown);
virtual LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
private:
struct PlotPoint
{
short x;
short y;
bool PenDown;
COLORREF color;
};
std::vector<PlotPoint> m_points; // Points of lines to draw
COLORREF m_PenColor;
};
#endif //VIEW_H