Why does my drawing not show on screen?

JWG 146 Reputation points
2023-07-29T14:55:44.9266667+00:00

I've been trying for well over a month now, to draw something to screen with a render target other than Hwnd, but not having any success.

Can someone help me to get this done.

I will submit my entire code. I hope it's not too confusing, but any corrections will be appreciated.

The file is too large, so you will need to create a Windows Application, and then just drop in the code.

The App_Draw function is where the drawing is to be done.

I appreciate any help with this. Thanks.

Application.txt

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,823 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,757 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Castorix31 88,711 Reputation points
    2023-07-29T15:59:55.93+00:00

    To draw with a Direct2D device context, you can follow MSDN doc at : How to render by using a Direct2D device context

    I had posted some samples, like in this thread : https://learn.microsoft.com/en-us/answers/questions/1002167/migrating-from-id2d1hwndrendertarget-direct2d-1-0

    1 person found this answer helpful.

  2. JWG 146 Reputation points
    2023-08-06T15:05:26.86+00:00

    The problem was with a little mix-up in my code, but nothing was wrong with the steps I used from the Program Guide. I can see my drawings now.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.