#pragma once

// Dummy grabber parameters dialog
class DummyParamDialog : public CDialog
{
public:
  DummyParamDialog(int w = 1024, int h = 768) : CDialog(IDD_DUMMY_PARAMETERS), width(w), height(h)
  {}

protected:
  DECLARE_MESSAGE_MAP()
  virtual void DoDataExchange(CDataExchange* pDX)
  {
    CDialog::DoDataExchange(pDX);
    DDX_Control(pDX, IDC_FRAME_WIDTH, width_ctrl);
    DDX_Control(pDX, IDC_FRAME_HEIGHT, height_ctrl);
  }

  virtual BOOL OnInitDialog()
  {
    CDialog::OnInitDialog();

    width_ctrl.SetWindowText(std::to_wstring(width).c_str());
    height_ctrl.SetWindowText(std::to_wstring(height).c_str());

    return TRUE;
  }

  void OnOK()
  {
    CString str = _T("");
    width_ctrl.GetWindowTextW(str);
    width = _wtoi(str);

    height_ctrl.GetWindowTextW(str);
    height = _wtoi(str);

    CDialog::EndDialog(1);
  }

  // edit controls
  CEdit width_ctrl;
  CEdit height_ctrl;

public:
  int width;
  int height;
};

BEGIN_MESSAGE_MAP(DummyParamDialog, CDialog)
END_MESSAGE_MAP()

