Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Create function is not working in release mode but working in debug mode

Create function is not working in release mode but working in debug mode

Scheduled Pinned Locked Moved C / C++ / MFC
debugginghelptutorialquestionannouncement
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lavate malllik
    wrote on last edited by
    #1

    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?

    J N M 3 Replies Last reply
    0
    • L lavate malllik

      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?

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      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 your CNodeView's class name. You must have a used RegisterClassEx or AfxRegisterWndClass 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

      1 Reply Last reply
      0
      • L lavate malllik

        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?

        J Offline
        J Offline
        Jijo Raj
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • L lavate malllik

          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?

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          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:

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups