Thread: undefined LPDIRECT3DDEVICE9

  1. #1
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717

    undefined LPDIRECT3DDEVICE9

    Hello.
    I'm very new at DirectX API coding and am trying to make a child window for HGE

    I pasted the code at C++ code - 180 lines - codepad

    Now my m_pd3dDevice is undefined (or so I believe) but I didn't pass a pointer to CreateDevice, yet I don't know if that defines the variable...

    So, could anyone help? Also sorry if I lack detail, feel free to ask for more!

    Thanks in advance!
    Currently research OpenGL

  2. #2
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    Right now if your window is null you perform init()....which is an error which would make m_pd3dDevice be null due to CreateDevice failing. On the other hand if the window is successfully created then init will never be called, so m_pd3 would still be a pointer to who knows what.
    Code:
    			if( m_hWnd == NULL )
    				// Do error handling code
    
    			init();
    			Render();
    On a second quick pass you do the same thing with RegisterClass(), so the window never even gets created. IE a comment will not "eat" up the next statement after an if.
    Last edited by valaris; 05-21-2009 at 08:35 AM.

  3. #3
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717
    ahh... Forgot those :S
    Thanks!
    Currently research OpenGL

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  2. C OpenGL Compiler Error?
    By Matt3000 in forum C Programming
    Replies: 12
    Last Post: 07-07-2006, 04:42 PM
  3. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM
  4. Problem with OpenGL tutorial
    By 2Biaz in forum Windows Programming
    Replies: 18
    Last Post: 09-16-2004, 11:02 AM
  5. qt help
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 04-20-2002, 09:51 AM