What's the step of creating a CDialogBar object? Should I assign a new class to it?

I create a dialog bar and place a button control on it. After this, I write the code of the click event. But the button doesn't enable when I execute the program. What's wrong with it?