static void UpdateSlitPos(wxSpinEvent& event) { SlitPosCtx *ctx = static_cast<SlitPosCtx *>(event.GetEventUserData()); wxPoint center(ctx->dlg->m_x->GetValue(), ctx->dlg->m_y->GetValue()); wxSize size(ctx->dlg->m_width->GetValue(), ctx->dlg->m_height->GetValue()); int angle = ctx->dlg->m_angle->GetValue(); ctx->guider->SetOverlaySlitCoords(center, size, angle); }