// Called when the canvas receives a mouse event.
void BombsCanvasClass::OnEvent(wxMouseEvent& event)
{
- long fx, fy;
- event.Position(&fx, &fy);
+ wxCoord fx, fy;
+ event.GetPosition(&fx, &fy);
int x = fx/(x_cell*X_UNIT);
int y = fy/(y_cell*Y_UNIT);
if (x<field_width && y<field_height)