How to get the Hardware Device Context for an Image object?

General APL language issues

How to get the Hardware Device Context for an Image object?

Postby Rav on Tue Jun 25, 2024 4:07 pm

In APL+Win, they have a Picture object which can be accessed with low-level Windows API functions via ⎕WCALL or ⎕NA. In order to do that, they provide an hdc (Hardware Device Context) property which the Windows API requires. Even if they didn't provide an hdc, they also provide a hwnd (Windows handle) property, with which one could retrieve an hdc using the Windows GetWindowDC or GetDC function.

In Dyalog, if I understand correctly, the analog to APL+Win's Picture object is the Image object. The problem is that Image objects have neither an hdc nor an hwnd property, so I can't figure out how I can address them with the Windows API.

Is there a way to get the Handle or HDC for a Picture object? Or, if the Picture object refers to a Bitmap, a way to get a Handle or HDC to that Bitmap?

Thanks /Rav
Rav
 
Posts: 26
Joined: Tue Jul 25, 2023 4:41 pm

Return to Language

Who is online

Users browsing this forum: No registered users and 1 guest