Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Member function "FromHBITMAP" not found
#1
I've tried to copy an image from clipboard using the following code snippet, but it tells me that "FromHBITMAP" is unknown member.
Macro Macro20
Code:
Copy      Help
#compile "__Gdip"
GdipBitmap t_im
OpenClipboard(_hwndqm)
t_im.FromHBITMAP(GetClipboardData(CF_BITMAP))
CloseClipboard
if(!t_im) out "failed to get bitmap from clipboard"
What am I missing?
#2
I did not update Archive.qml in Collected QM apps, functions, samples after adding the function. Now updated.
Or copy paste this:
Member function GdipBitmap.FromHBITMAP
Code:
Copy      Help
function'GDIP.GpBitmap* hBitmap [hPalette]

;Create this bitmap from GDI bitmap.


if(!GdipInit) ret
Delete

_hresult=GDIP.GdipCreateBitmapFromHBITMAP(hBitmap hPalette +&m_i)
ret +m_i
#3
Thank you, it works now!


Forum Jump:


Users browsing this thread: 1 Guest(s)