memset(&m_d3dPresent, 0, sizeof(m_d3dPresent)); m_d3dPresent.BackBufferWidth = m_nWidth; m_d3dPresent.BackBufferHeight = m_nHeight; m_d3dPresent.BackBufferFormat = (bWindowed) ? D3DFMT_UNKNOWN : D3DFMT_R5G6B5; m_d3dPresent.BackBufferCount = 1; m_d3dPresent.MultiSampleType = D3DMULTISAMPLE_NONE; m_d3dPresent.MultiSampleQuality = 0; m_d3dPresent.SwapEffect = D3DSWAPEFFECT_COPY; m_d3dPresent.hDeviceWindow = m_hWnd; m_d3dPresent.Windowed = bWindowed; m_d3dPresent.EnableAutoDepthStencil = true; m_d3dPresent.AutoDepthStencilFormat = D3DFMT_D16; m_d3dPresent.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER; m_d3dPresent.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT; m_d3dPresent.PresentationInterval = (bVSync) ? D3DPRESENT_INTERVAL_DEFAULT : D3DPRESENT_INTERVAL_IMMEDIATE;
If its windowed then I do indeed use D3DFMT_UNKNOWN.
If you do what EasilyConfused said with D3DLoadTextureFromFileEx() you should be good with the colorkey.
Oh yeah! I know that we aren't using sprites but this should fix your problem:
Call D3DXCreateSprite() to create a sprite, then call Begin(D3DXSPRITE_ALPHABLEND) on your sprite after BeginScene(), and end it prior to EndScene(), that may help you out. It fixed my problem that I had with it.
Brandon