newbie question

This is a discussion on newbie question within the Windows Programming forums, part of the Platform Specific Boards category; new to windows graphics programming or what not and am trying to get this include file to work. i cant ...

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    255

    newbie question

    new to windows graphics programming or what not and am trying to get this include file to work. i cant seem to get it to include like the book says to. i added it to the input folder in the project properties option.

    more clearly it said to add this to the project properties then to the input folder in there and the first option to add these files to it and i did and it wont work

    2003.net compiler by the way

    book said to add. d3d9.lib d3dx9.lib and winmm.lib

    thanks


    Code:
    #include <windows.h>
    #include <d3dUtility.h>//THE INCLUDE I CANT GET TO WORK
    
    IDirect3DDevice9* device = 0;
    
    bool setup()
    {
    return true;
    }
    
    void cleanup()
    {
    }
    
    bool display(float timedelta)
    {
    	if(device)
    	{
    		device->Clear(0, 0, D3DCLEAR TARGET | D3DCLEAR ZBUFFER, 0x00000000, 1.0f, 0);
    		device->Present(0,0,0,0);
    	}
    	return true;
    }
    
    HRESULT IDirect3DDevice9::Clear(DWORD Count, const D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float z, DWORD Stencil);
    
    LRESULT CALLBACK d3d::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
    {
    	switch(msg) 
    	{
    	case WM DESTROY:
    		::PostQuitMessage(0);
    		break;
    	case WM KEYDOWN:
    		if(wParam == VK ESCAPE)
    			::DestroyWindow(hwnd);
    		break
    	}
    	return ::DefWindowProc(hwnd,msg,wParam,lParam);
    }
    
    int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE prevInstance, PSTR cmdLine, int showQmd)
    {
    	if(!d3d::InitD3D(hinstance, 800, 600, true, D3DDEVTYPE HAL, &device));
    	{
    		::MessageBox(0, "InitD3D() - Failed",0,0);
    		return 0;
    	}
    	if(!Setup())
    	{
    		::MessageBox(0,"Setup() - Failed",0,0);
    		return 0;
    	}
    	d3d::EnterMsgLoop(Display);
    	Cleanup();
    	device->Release();
    	return 0;
    }
    hooch

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,261
    Code:
    #include <d3dUtility.h>
    That isn't a standard directX header. It is probably something that comes with your book.

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    hmm i thought i did post it oops lol

    c:\source\game 3\game 3 proj\TONY.cpp(2): fatal error C1083: Cannot open include file: 'd3dUtility.h': No such file or directory

    EDIT: actually i dont know i didnt buy the book i was looking for something for game programming on bittorrent and i stumbled across this big file. as i was originally looking for something i already had but wanted a more up to date version but what i downloaded was 900 MBs worth of tutorials on various topics related to it so i just figured that was a file within the DirectX 9 that i downloaded from microsofts site

    it also makes no mention of not using non standard stuff. at least i didnt see any mention of it. so i kind of figured it was a standard header file?
    Last edited by ssjnamek; 11-12-2005 at 02:31 PM.
    hooch

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Stupid Newbie question
    By TimL in forum C++ Programming
    Replies: 4
    Last Post: 07-22-2008, 05:43 AM
  2. C prog newbie question
    By Draginzuzu in forum C Programming
    Replies: 1
    Last Post: 02-03-2003, 06:45 PM
  3. a stupid question from a newbie
    By newcomer in forum C++ Programming
    Replies: 4
    Last Post: 01-11-2003, 04:38 PM
  4. confusion with integers (newbie question)
    By imortal in forum C Programming
    Replies: 7
    Last Post: 12-06-2002, 04:09 PM
  5. newbie class templates question
    By daysleeper in forum C++ Programming
    Replies: 2
    Last Post: 09-18-2001, 10:50 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21