I took the liberty to create a default MFC Dialog based project. I am using Visual Studio 2017 Enterprise. I then inserted your code.
Here is how your code should look like (and of course, you should not call the destructor and also nothing to do with x86 Vs. x64).
CString myString;
dlg = new CMyDialog(NULL);
myString = _T("test");
dlg.m_slg_string = myString;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
myString = dlg->m_dlg_string;
}
else if (nResponse == IDCANCEL)
{
}
else if (nResponse == -1)
{
TRACE(traceAppMsg, 0, "Warning: dialog creation failed, so application is terminating unexpectedly.\n");
TRACE(traceAppMsg, 0, "Warning: if you are using MFC controls on the dialog, you cannot #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS.\n");
}