DialogBox Create Fails
-
Hi My code for Create (of a dialog box fails) in MFC base code specifically the line in bold when I try to Create for a DialogBox I have DECLARE_DYNAMIC and IMPLEMENT_DYNAMIC in the respective sources though I don't think that is a issue one way or a other Don't know why
main_app->myshow_storageptr = new Show_storage();
main_app->myshow_storageptr->AssertValid();
main_app->myshow_storageptr->Create(IDD_DIALOG6,NULL);MFC code from wincore
void AFXAPI AfxHookWindowCreate(CWnd* pWnd)
{
_AFX_THREAD_STATE* pThreadState = _afxThreadState.GetData();
if (pThreadState->m_pWndInit == pWnd)
return;if (pThreadState->m\_hHookOldCbtFilter == NULL) { pThreadState->m\_hHookOldCbtFilter = ::SetWindowsHookEx(WH\_CBT, \_AfxCbtFilterHook, NULL, ::GetCurrentThreadId()); if (pThreadState->m\_hHookOldCbtFilter == NULL) AfxThrowMemoryException(); } ASSERT(pThreadState->m\_hHookOldCbtFilter != NULL); ASSERT(pWnd != NULL); **ASSERT(pWnd->m\_hWnd == NULL); ** // only do once ASSERT(pThreadState->m\_pWndInit == NULL); // hook not already in progress pThreadState->m\_pWndInit = pWnd;
-
Hi My code for Create (of a dialog box fails) in MFC base code specifically the line in bold when I try to Create for a DialogBox I have DECLARE_DYNAMIC and IMPLEMENT_DYNAMIC in the respective sources though I don't think that is a issue one way or a other Don't know why
main_app->myshow_storageptr = new Show_storage();
main_app->myshow_storageptr->AssertValid();
main_app->myshow_storageptr->Create(IDD_DIALOG6,NULL);MFC code from wincore
void AFXAPI AfxHookWindowCreate(CWnd* pWnd)
{
_AFX_THREAD_STATE* pThreadState = _afxThreadState.GetData();
if (pThreadState->m_pWndInit == pWnd)
return;if (pThreadState->m\_hHookOldCbtFilter == NULL) { pThreadState->m\_hHookOldCbtFilter = ::SetWindowsHookEx(WH\_CBT, \_AfxCbtFilterHook, NULL, ::GetCurrentThreadId()); if (pThreadState->m\_hHookOldCbtFilter == NULL) AfxThrowMemoryException(); } ASSERT(pThreadState->m\_hHookOldCbtFilter != NULL); ASSERT(pWnd != NULL); **ASSERT(pWnd->m\_hWnd == NULL); ** // only do once ASSERT(pThreadState->m\_pWndInit == NULL); // hook not already in progress pThreadState->m\_pWndInit = pWnd;
What type of object is
Show_storage
? What doesCreate()
return? Where is your code called from, or what is it in response to?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
What type of object is
Show_storage
? What doesCreate()
return? Where is your code called from, or what is it in response to?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Hi My code for Create (of a dialog box fails) in MFC base code specifically the line in bold when I try to Create for a DialogBox I have DECLARE_DYNAMIC and IMPLEMENT_DYNAMIC in the respective sources though I don't think that is a issue one way or a other Don't know why
main_app->myshow_storageptr = new Show_storage();
main_app->myshow_storageptr->AssertValid();
main_app->myshow_storageptr->Create(IDD_DIALOG6,NULL);MFC code from wincore
void AFXAPI AfxHookWindowCreate(CWnd* pWnd)
{
_AFX_THREAD_STATE* pThreadState = _afxThreadState.GetData();
if (pThreadState->m_pWndInit == pWnd)
return;if (pThreadState->m\_hHookOldCbtFilter == NULL) { pThreadState->m\_hHookOldCbtFilter = ::SetWindowsHookEx(WH\_CBT, \_AfxCbtFilterHook, NULL, ::GetCurrentThreadId()); if (pThreadState->m\_hHookOldCbtFilter == NULL) AfxThrowMemoryException(); } ASSERT(pThreadState->m\_hHookOldCbtFilter != NULL); ASSERT(pWnd != NULL); **ASSERT(pWnd->m\_hWnd == NULL); ** // only do once ASSERT(pThreadState->m\_pWndInit == NULL); // hook not already in progress pThreadState->m\_pWndInit = pWnd;