D3D Render to Desktop(D3D渲染到桌面)

HWND hWnd = ::FindWindow( L"Progman",L"Program Manager");

DWORD dwStyle = ::GetWindowLong( hWnd,GWL_EXSTYLE );
dwStyle |= WS_EX_LAYERED;
::SetWindowLong( hWnd,GWL_EXSTYLE,dwStyle );
::SetLayeredWindowAttributes( hWnd,0,127,LWA_ALPHA );
InitD3D( hDesktop );

InitGeometry(); 

RenderLoop(); 

你可能感兴趣的:(Desktop)