Original Post
🔒 Locked
DIrect Draw Object Creation
Advertisement
sorry should have put this up here earlier
/**********************************************************/
HRESULT hr = DirectDrawCreate(NULL, &m_pDDObject, NULL) ;
if (FAILED(hr) || NULL == m_pDDObject)
{
MessageBox(hWndApp,
TEXT(DDErrorString(hr)),
TEXT("Error"), MB_OK | MB_ICONSTOP) ;
return FALSE ;
}
return TRUE;
/***********************************************************/
this first parameter is a guid to a device. Setting it to null uses the default device
the second is a pointer to a dd object(actually **dd)
the last is ?pUnkOuter?
don''t know what it is but setting it to anything but null causes an error
so i''m lost as to what the invalid parameter could be
/**********************************************************/
HRESULT hr = DirectDrawCreate(NULL, &m_pDDObject, NULL) ;
if (FAILED(hr) || NULL == m_pDDObject)
{
MessageBox(hWndApp,
TEXT(DDErrorString(hr)),
TEXT("Error"), MB_OK | MB_ICONSTOP) ;
return FALSE ;
}
return TRUE;
/***********************************************************/
this first parameter is a guid to a device. Setting it to null uses the default device
the second is a pointer to a dd object(actually **dd)
the last is ?pUnkOuter?
don''t know what it is but setting it to anything but null causes an error
so i''m lost as to what the invalid parameter could be
I got the program to go to exclusive mode( directdraw is completely inside a class and i forgot the " = new") and it does a colorfill of the back and flips during idle time, everytime returning DD_OK. I now have a bitmap loaded into an offscreen surface using DDLoadBitmap( again its returning DD_OK everywhere ).
I do know directx so i have been rather cautious about return values but maybe i'm missing something to do with DDLoadBitmap. Do i have to create the surface first then load the bitmap or is it something to do with front buffer. I also tried both blt and bltfast but i've heard talk of StretchBlt but i believe its external to DDraw.
Also if anyone knows of any sites that deal with this subject a little more than most tutorials, that would probably help alot. I'm working on a Full Motion Video game and bitmaps are the only thing i need for my main menu, DirectShow was actuallt easier to get working usind an overlay mixer( just derived a class from the base classes ). But VC++ is still a little new to me, so i might be missing something that seems obvious to you.
Do i have to setup the palette before i blt?
( i'm not sure if its direcdraw7 but its the object the overlay mixer uses )
Edited by - KlePt0 on April 18, 2001 3:10:07 PM
I do know directx so i have been rather cautious about return values but maybe i'm missing something to do with DDLoadBitmap. Do i have to create the surface first then load the bitmap or is it something to do with front buffer. I also tried both blt and bltfast but i've heard talk of StretchBlt but i believe its external to DDraw.
Also if anyone knows of any sites that deal with this subject a little more than most tutorials, that would probably help alot. I'm working on a Full Motion Video game and bitmaps are the only thing i need for my main menu, DirectShow was actuallt easier to get working usind an overlay mixer( just derived a class from the base classes ). But VC++ is still a little new to me, so i might be missing something that seems obvious to you.
Do i have to setup the palette before i blt?
( i'm not sure if its direcdraw7 but its the object the overlay mixer uses )
Edited by - KlePt0 on April 18, 2001 3:10:07 PM
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement