MFC Dialog Data Exchange

17 December, 2008 § 1 Comment

I’ve been surprised to learn that there are developers who have worked in MFC for a long time and never really knew much about Dialog Data Exchange. I don’t fault them, since the easiest way to stumble upon it is through the Forms Designer’s context menu (besides seeing it in the generated code and having no clue what it does).

Dialog Data Exchange (DDX) is a really nifty feature that MFC brought forward to use when working with user interfaces. DDX strongly types variables and controls in the Dialog/Form’s associated class to the objects found in the UI.

This means you can get rid of GetDlgItem. Why does this help? Besides removing code and tons of enums interspersed throughout your code, it allows the ability to subclass a control easily with minimal code changes. Here is a short example: « Read the rest of this entry »

Where Am I?

You are currently browsing entries tagged with ddx at JAWS.