The code you've shown has little, if anything, to do with the question you've asked.
acce55 wrote:
please give me detials or a tutorial on how to create a class derived from CDIALOG...
If you have already designed the dialog template, open ClassWizard (Ctrl+W). It should prompt you for creating a class or selecting an existing class. Selecting the former should bring up a New Class dialog with the Base class and Dialog ID already filled in. The steps in VS200x are different. I do not have that version in front of me to provide details.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius