<p>I would like to have something like this:</p>

<pre><code>class Foo {
private:
  int bar;
public:
  void setBar(int bar);
  int getBar() const;
}

class MyDialog : public CDialogImpl&lt;MyDialog&gt; {
  BEGIN_MODEL_MAPPING()
    MAP_INT_EDITOR(m_editBar, m_model, getBar, setBar);
  END_MODEL_MAPPING()
  // other methods and message map
private:
  Foo * m_model;
  CEdit m_editBar;
}
</code></pre>

<p>Also it would be great if I could provide my custom validations:</p>

<pre><code>MAP_VALIDATED_INT_EDITOR(m_editBar, m_model, getBar, setBar, validateBar)
...
bool validateBar (int value) {
  // custom validation
}
</code></pre>

<p>Have anybody seen something like this?</p>

<p>P.S. I don't like DDX because it's old and it's not flexible, and I cannot use getters and setters.</p>

The
Cocoa Bindings
provide exactly what you want, but they are only available in the Mac / Objective-C word.
GNUstep
is a free version of it, but it's still Objective-C, not C++.
However, it might be a good inspiration for an own framework, or a good starting point for further research.