Hey thanks for the answer I added the directx debug layer yesterday and it told me the fact with the format.
I passed in the Format from the ID3D11Texture2D creation above and now it works.Also I had a problem with the flags but with ZeroMemory it works fine now.
Well now I have a issue with the OMSetRenderTargets function
It tells me the rendertargetview and the depthstencil are not compatible.My rendertargetview is a líttle bit smaller from the dimensions..I don't know why..
ID3D11DeviceContext::OMSetRenderTargets: The RenderTargetView at slot 0 is not compatable with the DepthStencilView. DepthStencilViews may only be used with RenderTargetViews if the effective dimensions of the Views are equal, as well as the Resource types, multisample count, and multisample quality. The RenderTargetView at slot 0 has (w:1008,h:730,as:1), while the Resource is a Texture2D with (mc:1,mq:0). The DepthStencilView has (w:1024,h:768,as:1), while the Resource is a Texture2D with (mc:1,mq:0). D3D11_RESOURCE_MISC_TEXTURECUBE factors into the Resource type, unless GetFeatureLevel() returns D3D_FEATURE_LEVEL_10_1 or greater. [ STATE_SETTING ERROR #388: OMSETRENDERTARGETS_INVALIDVIEW]
EDIT: I've got it.Just got the client dimensions with GetClientRect and passed it to the desc.Well I never saw that before...always the normal resolution..