It is easier to right-click the project and chose Add -> Class, and derive from CDialog. That way you will get the class skeleton and the dialog resource directly.
In your main dialogs event handler for your button, create an instance of your dialog and show it.
ON_BN_CLICKED(IDC_BRIGHTNESS_BUTTON, OnClickBrightnessButton)
void CMainDlg::OnClickBrightnessButton()
{
CBrightnessDlg brightnessDlg;
if (brightnessDlg.DoModal() == IDOK)
{
m_brightness = brightnessDlg.GetBrightness();
}
}