Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

OoMMMoO

Newbie Dx question

This topic is 6918 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im pretty new to this so please dont laugh at my questions 1.I am using mvc++ and have set the options to look in the directx lib folder for everything and when I try and compile a direct draw program it says c:\program files\microsoft visual studio\myprojects\test\main.cpp(23) : fatal error C1010: unexpected end of file while looking for precompiled header directive can anyone help? 2. Also does anyone know of a good directx tutorial with using c++? And is this code right for initializing it? LPDIRECTDRAW lpdd; bool DirectDrawInit(HWND hwnd) { HRESULT ddrval; ddrval=DirectDrawCreate(NULL,&lpdd,NULL); ddrval=lpdd->SetCooperativeLevel(hwnd,DDSCL_EXCLUSIVE / DDSCL_FULLSCREEN); if(ddrval!=DD_OK) { lpdd->release(); return(false); } return (true); } When I want to use the function what do i put in for HWND hwnd in DirectDrawinit()???? Thanks alot

Share this post


Link to post
Share on other sites
Advertisement
You probably just loaded someone elses source in a new project right? The easiest way to fix this is to go to Project->Settings, then the C/C++ tab, then the Precompiled headers category and turn off precompiled headers. This has the advantage that if you give someone else the source code they''ll also have to deal with the pre-compiled header directive being missing.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!