Simon Mourier's Avatar
Simon Mourier's blog (1346 answers on StackOverflow) about Microsoft technologies C#, C/C++, .NET, WinRT, WinUI, COM, Interop, DirectX, Direct2D, Windows, ...
  • 🔎︎ Search
  • Categories
  • Archives
  • About Me
  • c/c++
  • direct2D
  • winapi

Problen while creating ID2D1RenderTerget

Apr 19, 2020 See the question and my original answer on StackOverflow

As I said in my comment, your must declare renderTarget as ID2D1HwndRenderTarget* because the CreateHwndRenderTarget method expects this type, so just change your test code declaration like this for example:

void test(ID2D1Factory* factory, ID2D1HwndRenderTarget* rendertarget, HWND hwnd)
  • SmoBlog © 2010-2025 Simon Mourier. All rights reserved.
  • Privacy & Terms