Newbie Dx question

Started by
0 comments, last by OoMMMoO 23 years, 11 months ago
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
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.

This topic is closed to new replies.

Advertisement