Original Post
Hi everybody,
I''m new to DirectX and I''ve got a problem that''s driving me mad. I''m developing a C++ class for DirectDraw applications. When I want to get the backbuffer, the result always is DDERR_NOTFOUND. The code looks like this:
HResult = PrimarySurface->GetAttachedSurface(&Caps,&BackBuffer);
BackBuffer and PrimarySurface are both data members of my DD class. Initializing DirectDraw, getting the primary surface and setting the display mode works fine. Now here''s the weird part : I used exactly the same code in an application without classes and it worked fine. When I try to encapsulate my code into a C++ class, the thing stops working. What am I doing wrong?
Please reply by e-mail.
------------------------
leviathan569@hotmail.com
------------------------