Skip to main content
gamedev.net
🔒 Locked

Problem initializing DirectDraw

Started by Shadowflare 1 reply 400+ views
Original Post
Shadowflare
Shadowflare
I''m beginning to learn about DirectX in C++, and am having a bit of trouble. When I call the SetCooperativeLevel, and pass it the handle to my window and DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN, it does not return DD_OK and I can''t figure out why. Anyone who can help? Thanks!
Pipo DeClown
Pipo DeClown
LOL! the handle is invalid, i had this problem and i just written it again. now it works!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

incase you dont know what im talking about, do this:

if(g_hWnd==NULL){
//error checking
}

I didnt know why neither. Ask Vendayan
Shadowflare
Shadowflare
Hmmm, it seems then if I assign WS_POPUP to the extendedStyle when creating the window, it doesn''t assign a proper handle. DirectDraw initialized fine after I remove it, but I still have the title bar and border visible. Will I learn how to get rid of this using DirectX eventually? Anyway, thanks for pointing me in the right direction, Pipo! :-D

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.