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.
// In message map of main dlg
// Maybe set data in your dialog here:
// Open the dialog
if (brightnessDlg.DoModal() == IDOK)
// User pressed ok, fetch the value
m_brightness = brightnessDlg.GetBrightness();