Note that there are some explanatory texts on larger screens.

plurals
  1. POMFC application DialogBased using propertyPage, DoModal() for a CDialog don't open any Dialog
    text
    copied!<p>In VS2013, i created an MFC Application Dialoged Based. I modify the project in order to use PropertyPage and Propertysheet at the beginning of the application, so, instead of lauching a CDialog, it launch my propertypage.</p> <p>After, I created a Dialog, and the class associates ( from::CdialogEx). I would like to open this dialog behind a button click.</p> <p><strong>Behind my button click, i do:</strong></p> <pre><code>CMyDialog myDialog; myDialog.DoModal(); </code></pre> <p>I don't have any error message, but, i don't show my Dialog at the screen.</p> <p>Maybe it's because this dialog has no child no ?</p> <p>Anyone could help me please ?</p> <p>Thanks a lot,</p> <p>Best regards,</p> <p>Nixeus</p> <p>EDIT :</p> <p><strong>Here is my Entry point :</strong></p> <pre><code>#include "stdafx.h" #include "KenoApp.h" #include "KenoDlg.h" #include "GenerationDlg.h" #include "KenoSheet.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CKenoApp BEGIN_MESSAGE_MAP(CKenoApp, CWinApp) ON_COMMAND(ID_HELP, &amp;CWinApp::OnHelp) END_MESSAGE_MAP() // construction CKenoApp CKenoApp::CKenoApp() { } // Seul et unique objet CKenoApp CKenoApp theApp; // initialisation de CKenoApp BOOL CKenoApp::InitInstance() { AfxEnableControlContainer(); // Standard initialization #ifdef _AFXDLL // Call this when using MFC in a shared DLL #else Enable3dControlsStatic(); // Call this when linking to MFC statically #endif CKenoSheet KenoSheet; KenoSheet.SetTitle(L"Keno Helper v1.1"); CGenerationDlg Generation; CKenoDlg KenoDlg; KenoSheet.AddPage(&amp;KenoDlg); KenoSheet.AddPage(&amp;Generation); //m_pMainWnd = &amp;KenoSheet; int nResponse = KenoSheet.DoModal(); // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; } </code></pre> <p><strong>And after, on my property page :</strong></p> <pre><code>CAboutDlg myDialog; theApp.m_pMainWnd = &amp;myDialog; myDialog.DoModal(); </code></pre> <p>My problem is now that, the DoModal() close my application.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload