Click here to Skip to main content
15,920,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalstatic and dynamic linking Pin
ns21-Sep-04 2:38
ns21-Sep-04 2:38 
GeneralSwitching problem between view and dialog attached Pin
ledallam21-Sep-04 2:19
ledallam21-Sep-04 2:19 
GeneralHeader File required Pin
Mythri.B.L21-Sep-04 2:07
Mythri.B.L21-Sep-04 2:07 
GeneralRe: Header File required Pin
David Crow21-Sep-04 2:46
David Crow21-Sep-04 2:46 
GeneralRe: Header File required Pin
shiraztk21-Sep-04 2:50
shiraztk21-Sep-04 2:50 
GeneralRe: Header File required Pin
Anonymous21-Sep-04 18:22
Anonymous21-Sep-04 18:22 
GeneralRe: Header File required Pin
Henry miller21-Sep-04 3:31
Henry miller21-Sep-04 3:31 
GeneralProblem with a IDirectDraw object! Pin
Dani10000121-Sep-04 1:48
Dani10000121-Sep-04 1:48 
I have this code:

static IDirectDrawSurface * CreateOffScreenSurface(IDirectDraw *pdd, int dx, int dy)
{
DDSURFACEDESC ddsd;
IDirectDrawSurface *pdds;
//
// create a DirectDrawSurface for this bitmap
//
ZeroMemory(&ddsd, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT |DDSD_WIDTH;
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
ddsd.dwWidth = dx;
ddsd.dwHeight = dy;

if(pdd->CreateSurface(&ddsd,&pdds,NULL)!=DD_OK)

I get an error :

error C2039: 'CreateSurface' : is not a member of 'IDirectDraw'
c:\program files\microsoft visual studio\vc98\include\ddraw.h(491) : see declaration of 'IDirectDraw'

And I cannot understand why I am getting this error, I have linked the project with ddraw.lib and included the ddraw.h.

when I click at the error line : see declaration of IDirectDraw it shows that CreateSurface is a member function, but why doesn´t the compiler think so???

And when I print pdd->.... it shows a list of the memberfunctions and CreateSurface is listed, so I just can´t see why I have this strange error.

I have the same error with the IDirectDrawSurface memberfunctions.

Does anyone have a clue? I am totally lost.... Thanks for your help, regards Dani
GeneralRe: Problem with a IDirectDraw object! Pin
Alexander M.,21-Sep-04 3:12
Alexander M.,21-Sep-04 3:12 
GeneralRe: Problem with a IDirectDraw object! Pin
Dani10000121-Sep-04 3:29
Dani10000121-Sep-04 3:29 
GeneralDisabling the minimize / Maximize button Pin
Sujan Christo21-Sep-04 1:41
Sujan Christo21-Sep-04 1:41 
GeneralRe: Disabling the minimize / Maximize button Pin
David Crow21-Sep-04 2:59
David Crow21-Sep-04 2:59 
GeneralA bug with CListCtrl? Or am I being stupid... Pin
m_dale21-Sep-04 1:28
m_dale21-Sep-04 1:28 
GeneralRe: A bug with CListCtrl? Or am I being stupid... Pin
RChin21-Sep-04 4:43
RChin21-Sep-04 4:43 
GeneralRe: A bug with CListCtrl? Or am I being stupid... Pin
m_dale22-Sep-04 0:31
m_dale22-Sep-04 0:31 
GeneralGDI+ Pin
FridaVega21-Sep-04 1:10
FridaVega21-Sep-04 1:10 
GeneralMFC ISAPI Redirection Filter Problem Pin
raed21-Sep-04 0:51
raed21-Sep-04 0:51 
GeneralDetect Modem Connection Pin
ftosteve21-Sep-04 0:44
ftosteve21-Sep-04 0:44 
GeneralRe: Detect Modem Connection Pin
vcplusplus21-Sep-04 1:55
vcplusplus21-Sep-04 1:55 
GeneralRe: Detect Modem Connection Pin
ftosteve21-Sep-04 4:07
ftosteve21-Sep-04 4:07 
GeneralDisable Network Adapter Pin
ftosteve21-Sep-04 0:42
ftosteve21-Sep-04 0:42 
GeneralRe: Disable Network Adapter Pin
ThatsAlok7-May-05 0:42
ThatsAlok7-May-05 0:42 
Generalactivex events in a dll Pin
macmac3821-Sep-04 0:10
macmac3821-Sep-04 0:10 
Generalinpout32.dll expert help needed Pin
JBMW20-Sep-04 23:35
JBMW20-Sep-04 23:35 
GeneralTreeView in a virtual CListCtrl Pin
H0nger20-Sep-04 23:28
H0nger20-Sep-04 23:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.