Archived

This topic is now archived and is closed to further replies.

jimywang

how to get ddsd.dwWidth and Height

Recommended Posts

jimywang    100
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?

Share this post


Link to post
Share on other sites
hlivingstone    163
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.

Share this post


Link to post
Share on other sites
Kambiz    758
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;

Share this post


Link to post
Share on other sites