Hey guys,
Im getting blackscreen in my internal overlay.
I dont believe that this is a code problem, cuz the same code works fine when i change the configuration type to "Application (.exe)" instead of "Dynamic Library (.dll)".
The "DwmExtendFrameIntoClientArea" function is returning S_OK.
The LayeredWindowAttributes are fine:
Code:
SetLayeredWindowAttributes(Core::OverlayWindow.Hwnd, 0, 1, LWA_ALPHA);
SetLayeredWindowAttributes(Core::OverlayWindow.Hwnd, 0, RGB(0, 0, 0), LWA_COLORKEY);
Present Parameters too:
Code:
parameters.Windowed = TRUE;
parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
parameters.hDeviceWindow = window.Hwnd;
parameters.MultiSampleQuality = D3DMULTISAMPLE_NONE;
parameters.BackBufferFormat = D3DFMT_A8R8G8B8;
parameters.BackBufferWidth = window.GetWidth();
parameters.BackBufferHeight = window.GetHeight();
parameters.EnableAutoDepthStencil = TRUE;
parameters.AutoDepthStencilFormat = D3DFMT_D16;
And my render function:
Code:
this->Device->Clear(NULL, NULL, D3DCLEAR_TARGET, 0x00000000, 1.0f, NULL);
this->Device->BeginScene();
this->Menu->Draw();
this->Device->EndScene();
this->Device->Present(NULL, NULL, NULL, NULL);
I attached the dll in google chrome, and the overlay worked well.
Seem to be some kind of conflict with BF4 window.
Please help me!