(*lpdd)->
can't create and use ddraw in same function?
I'm not 100% sure about this but it may be as simple as chaging to to:
Just because the church was wrong doesn't mean Galileo wasn't a heretic.It just means he was a heretic who was right.
i'm trying to create ddraw and use it in a function call, passing it the address of lpdd:
int SetupDDraw(LPDIRECTDRAW7 *lpdd,HWND hwnd)
{
DirectDrawCreateEx(NULL, (VOID**)lpdd, IID_IDirectDraw7, NULL);
*lpdd->SetCooperativeLevel(hwnd,DDSCL_FULLSCREEN |
DDSCL_EXCLUSIVE | DDSCL_ALLOWREBOOT);
return 1;
}
the creation works fine, but i get "need class on the left of SetCoop...", well lpdd is the address of the pointer, so *lpdd is the pointer.. why doesn't this work?
Thanks in advance!
Alex
What I'd suggest doing is this. Change your function to use LPDIRECTDRAW7 &lpDD instead of *lpDD. Then just use the creation methods exactly as you would if lpDD was just a global.
DirectDrawCreateEx(NULL, &lpDD,...);
lpDD->SetCooperativeLevel(...);
It should work fine then
Jonathan
[This message has been edited by Jonathan (edited November 13, 1999).]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement