First of all. you are allocating dialog and button object on the heap. Why? It is unnecessary and requires you to remember to free memory allocated by explicitly calling delete. C++ does not have garbage collector.
Why not to use dialog editor and place check box in a dialog?
If you must for some weird reason create button at the run time, note following.
1. You are using Create to create button abd that implies a child window, despite a fact that you did not specify WS_CHILD style; Create function adds that style.
2. You pass pointer to a MFC dialog object that does not have window attached to it, hence m_hWnd of the dialog is NULL.
3. Create call fails since Windows cannot create a child as a top-level window (parentís handle is NULL).
Change code to call Create member of the button class after dialog has window attached to it. The best place is in a WM_INITDIALOG handler.
Again, restrain from allocating any object on the heap. Allocate it on the stack frame as a variable within a scope of another object that has a life span needed for a button to exist.
For example: declare CButton as a member variable of the CNewdialog class.
Declare CNewdialog object as local variable of the OnLoaddialogbutton. You need this dialog to be alive only within this function.
In both cases, memory is released automatically.
There are only 10 types of people in the world: Those who understand binary and those who do not.