how to get ddsd.dwWidth and Height

Started by
2 comments, last by jimywang 20 years ago
the only way i know how to get those 2 value is create a ddsd instance and run lock function then get the values.is there a simple way of doing it?
Advertisement
what is ddsd ? thats just a variable name, what struct or class does it belong to, and from what api does it originate? my guess is direct draw, but if your more descriptive im sure more people will know what your talking about and thus provide you with a solution faster.

also some incite as to the context your using the ''ddsd'' struct would also be nice.
HRESULT GetSurfaceDesc(LPDDSURFACEDESC lpDDSurfaceDesc);
lpDDSurfaceDesc:
Points to a DDSURFACEDESC structure to be filled in with the current description of this surface.


typedef struct _DDSURFACEDESC{
DWORD dwSize;
DWORD dwFlags;
DWORD dwHeight;
DWORD dwWidth;
LONG lPitch;
DWORD dwBackBufferCount;
DWORD dwZBufferBitDepth;
DWORD dwAlphaBitDepth;
LPVOID lpSurface;
DDCOLORKEY ddckCKDestOverlay;
DDCOLORKEY ddckCKDestBlt;
DDCOLORKEY ddckCKSrcOverlay;
DDCOLORKEY ddckCKSrcBlt;
DDPIXELFORMAT ddpfPixelFormat;
DDSCAPS ddsCaps;
} DDSURFACEDESC, FAR* LPDDSURFACEDESC;

thanks 4 the reply.i got it now.
btw,sorry that i didnt make it very clear.im in hurry to get my program done.thanks.

This topic is closed to new replies.

Advertisement