Hey guys.
Sorry for using code tags instead of source tags. It's been a while since I posted here and I couldn't remember which ones to use. Sorry also for the bad topic title and incorrect forum. My bro was rushing me to get off the computer so I had to make it quick.
Now that that is out of the way, I would like to point out a few things you seem to have misunderstood from my initial post. 1) The code I am using is completely from scratch. I'm piecing it together from the knowledge I have learned from the tutorials i am using,
DirectX Tutorial.com and
The Forger's Win32 Tutorial. I have tried direct copy pastes of the DXTutorial code which didn't work, and have also tried modifying the Forger's Win32 tutorial to add DX functionality. I have even tried using the DirectX documentation alone to create a successful app, but none have so far worked. I have gotten these code samples to work in the past but it's been an awful long time since I have programmed and I have long since reformatted. I had no trouble programming beyond this small issue in the past.
ToohrVyk: I have already tried passing it as a parameter to the function, however this causes 3 link errors:
Compiling...
Direct3D.cpp
Linking...
Isometric Engine.obj : error LNK2005: "struct IDirect3D9 * g_pD3D" (?g_pD3D@@3PAUIDirect3D9@@A) already defined in Direct3D.obj
Isometric Engine.obj : error LNK2005: "struct IDirect3DDevice9 * g_pD3DDevice" (?g_pD3DDevice@@3PAUIDirect3DDevice9@@A) already defined in Direct3D.obj
Direct3D.obj : error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "long __cdecl InitD3D(struct HWND__ *)" (?InitD3D@@YAJPAUHWND__@@@Z)
C:\Documents and Settings\Hillam\My Documents\Visual Studio 2005\Projects\Isometric Engine\Release\Isometric Engine.exe : fatal error LNK1120: 1 unresolved externals
EDIT: Forum stretching fixed. Sorry about that.
JollyJeffers: I tried pressing F1 but all it gave me was a page with a list of C++ keywords. I'm not sure this is what you intended to show me?
I think this may be due to the fact that I am passing it to the function as a HWND. What type of variable should I use in place of this? (dammit I really need to go back and read my C++ books :P)
[Edited by - _Sauce_ on September 19, 2007 8:05:23 AM]