I have an MFC dialog application created inside Visual Studio 2008.
CCalendarWindowDlg dlg; m_pMainWnd = &dlg; INT_PTR nResponse = dlg.DoModal();
When I launch the application, DoModal () states in the first line
INT_PTR CDialog::DoModal() { // can be constructed with a resource template or InitModalIndirect ASSERT(m_lpszTemplateName != NULL || m_hDialogTemplate != NULL || m_lpDialogTemplate != NULL); }
Can anybody help?
To solve this, in the constructor of my Dialog class, I did something like
CCalendarWindowDlg::CCalendarWindowDlg () :CDialog(IDD) { }
Note. I call the constructor of the CDialog parent class with the resource identifier of the form I want to submit.
It seems that the resource template is missing or incorrectly displayed.
IDD CCalendarWindowDlg , .
DLL ? DLL CCalendarWindowDlg.
, MFC , Visual Studio 2012. , .
:
CCalendarWindowDlg dlg(IDD_MYDIALOG); m_pMainWnd = &dlg; INT_PTR nResponse = dlg.DoModal();
, .
Source: https://habr.com/ru/post/1728009/More articles:java return statement - javaMake my look as beautiful as NSAlertView - user-interfaceHow to link javascript UIWebView exception source code to source file? - javascriptIn C # should the keyword “always” be followed by a class? - c #JSF drawing graphs (charts) - javaFixed 3 columns - htmlStoring short strings and numeric values in resources in Android - androidКак я могу использовать инструмент DBLinq >> DBMetal с sqlite? - sqliteHow to use Session in Java Servlet? - javaHow can I display the “Send To” and “Open With” context menus? - windowsAll Articles