class MainWindow : Form
{
public MainWindow()
{
InitializeComponent();
// Handlers
Paint += new PaintEventHandler(MainWindow_Paint);
MouseClick += new MouseEventHandler(MainWindow_MouseClick);
}
void MainWindow_MouseClick(object sender, MouseEventArgs e)
{
var p = new Point(e.X, e.Y);
m_ListOfFigures.ToArray()[0].addPoint(ref p);
Refresh();
}
void MainWindow_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
}
我不知道为什么我的注册了 wm_paint 的方法没有被调用?
你能指出我的错误吗?