How to implement GetDeviceCaps

Hi All
Trying to work out how to implement these api’s in Clarion (latest version)

GetDC(HWND),HDC,PASCAL,PROC,NAME(‘GetDC’)
GetDeviceCaps(HDC, SIGNED),SIGNED,PASCAL,NAME(‘GetDeviceCaps’)

Sadly, I don’t really have a clue as it’s been a while since I was a clarion dev.

Any assistance appreciated

Thanks
Paul

You can try winapi classes, here is an example of GetDeviceCaps usage.

dcScreen                        TDC
dpi                             UNSIGNED
  CODE
  dcScreen.GetDC(0)  !- screen dc
  dpi = dcScreen.GetDeviceCaps(LOGPIXELSX)
2 Likes

Hi Mike
Thanks so much for the reply.
I’ll check it out over the next few days.

Cheers
Paul

Hi Mike,
I try to use winapi classes but it needs printf.inc. Could you send it to us as well.

Thanks
Louie

There is a link to printf on winapi page.