Create function is not working in release mode but working in debug mode
-
We are having an application which is interacting with the static library(Default library) and in turn this will interact with the DLL. This is written on the application side ***************************************** CNodeView *node_view = NULL; node_view = m_default_mgr->GetGUI(node); (the call goes to if (NULL == m_pMainVseqEditor) return; if (!IsWindow(node_view->m_hWnd)) { CRect rectView = CRect(0,0,700,500); // create the window if(NULL == ((CWnd*)node_view)->Create(NULL, NULL, WS_CHILD | WS_VISIBLE, rectView , m_pMainVseqEditor, 14567)) The create function will work fine in debug mode but in release mode this return NULL. Let me know how to resolve this issue in relesse mode. Is there any specific project settings are there?
-
We are having an application which is interacting with the static library(Default library) and in turn this will interact with the DLL. This is written on the application side ***************************************** CNodeView *node_view = NULL; node_view = m_default_mgr->GetGUI(node); (the call goes to if (NULL == m_pMainVseqEditor) return; if (!IsWindow(node_view->m_hWnd)) { CRect rectView = CRect(0,0,700,500); // create the window if(NULL == ((CWnd*)node_view)->Create(NULL, NULL, WS_CHILD | WS_VISIBLE, rectView , m_pMainVseqEditor, 14567)) The create function will work fine in debug mode but in release mode this return NULL. Let me know how to resolve this issue in relesse mode. Is there any specific project settings are there?
lavate malllik wrote:
Create(
NULL,
NULL,First parameter takes the window class name for e.g.
WC_EDIT
, you have given nothing here, shouldn't you give yourCNodeView
's class name. You must have a usedRegisterClassEx
orAfxRegisterWndClass
for this purpose.Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com
-
We are having an application which is interacting with the static library(Default library) and in turn this will interact with the DLL. This is written on the application side ***************************************** CNodeView *node_view = NULL; node_view = m_default_mgr->GetGUI(node); (the call goes to if (NULL == m_pMainVseqEditor) return; if (!IsWindow(node_view->m_hWnd)) { CRect rectView = CRect(0,0,700,500); // create the window if(NULL == ((CWnd*)node_view)->Create(NULL, NULL, WS_CHILD | WS_VISIBLE, rectView , m_pMainVseqEditor, 14567)) The create function will work fine in debug mode but in release mode this return NULL. Let me know how to resolve this issue in relesse mode. Is there any specific project settings are there?
Did you check
GetLastError()
? You could also check it by adding@err,hr
in watch window. I hope it could give you some hint. Regards, Jijo._____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.
-
We are having an application which is interacting with the static library(Default library) and in turn this will interact with the DLL. This is written on the application side ***************************************** CNodeView *node_view = NULL; node_view = m_default_mgr->GetGUI(node); (the call goes to if (NULL == m_pMainVseqEditor) return; if (!IsWindow(node_view->m_hWnd)) { CRect rectView = CRect(0,0,700,500); // create the window if(NULL == ((CWnd*)node_view)->Create(NULL, NULL, WS_CHILD | WS_VISIBLE, rectView , m_pMainVseqEditor, 14567)) The create function will work fine in debug mode but in release mode this return NULL. Let me know how to resolve this issue in relesse mode. Is there any specific project settings are there?
What type is node_view? You use it in the IsWindow() call like it's a CWnd*, so why do you cast it to a CWnd* when you call the Create() method? Is m_pMainVseqEditor->m_hWnd valid at the Create() call? For clarity, FALSE is a better macro to use than NULL when you're comparing a BOOL (IMO).
Mark Salsbery Microsoft MVP - Visual C++ :java: