The declaration is as follows:

virtual BOOL OnInitDialog();

One reason I know it is not being called is that I have a break point in OnInitDialog method but it is never invoked. I have a break point in the constructor of the dialog which IS invoked.

Another reason I know it is not being called is that the stuff I want to happen in OnInitDialog isn't happen. It is supposed to disable some controls, set context-sensitivie help IDs and initialize some member variables. All of that doesnt happen.

The most bizarre thing is that the dialog does show up. All the controls are there, although the ones that should be disabled arent and they have no context-sensitive help (because OnInitDialog is never called)

By the way, my dialog is dervied from CFileDialog and it is using a dialog template resource. Basically, what I am doing is adding a couple of controls to standard file dialog.