Archived

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

Rufeooo

Surface Locking in Normal Cooperation mode

Recommended Posts

Rufeooo    122
Can surface locking be done while you are you in DDSCL_NORMAL? By this I mean: DirectDrawCreate(NULL,&m_lpDD,NULL) != DD_OK m_lpDD->SetCooperativeLevel(m_hWnd, DDSCL_NORMAL); While running in exclusive I can lock my surface, copy a bitmap into it, and continue happily. If I change to normal mode, the surface can never be locked, it crashes. I''m trying to debug other things and I really need to be out of exclusive mode. The surface->lock(...) has been giving me persistant trouble. If there is a better way to move an image from a array of rgb values into a surface let me know. Thanks. ~Alan

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
i am taiwanese, so my english very pool, i use DirectX 7.0

of course, can locked surface in noraml mode (Windowed Mode).

if you used DirectX 7.0, you can see SDK Samples:
in directory samples\multimedia\ddraw\src\switcher

Share this post


Link to post
Share on other sites
a person    118
you can lock anything except the primary buffer. (though you might be able to, check the sdk docs to be sure). best bet is to make a back buffer (you should have one anyway) and then after moving the data onto the back buffer you can use primary buffer''s blt to get the back buffer onto the primary buffer.

Share this post


Link to post
Share on other sites