You cannot do it this way; dialog resources are not part of the class object and are not inherited. The dialog resource is compiled into the executable file and loaded when you invoke
DoModal()
. As far as I know the only way to achieve what you want to do is to use a common dialog resource and then add dynamic controls in the
OnInitDialog()
function. You could also take a look at the
Common Dialogs[
^] and create a customizable version of your own.