04-11-2013, 04:14 PM
#compile "__Gdip"
GdipBitmap-- t_im t_out
OpenClipboard(0)
t_im.FromHBITMAP(GetClipboardData(CF_BITMAP))
CloseClipboard
if(!t_im) out "failed to get bitmap from clipboard"
;note: don't need to delete bitmap when from clipboard
PAINTSTRUCT ps
BeginPaint 0 &ps
t_im.DrawResize(ps.hDC 0 0 300 300 7)
EndPaint 0 &ps
t_out.FromHBITMAP(_i)
t_out.Save("q:\g.png")
Miss the code to go from ps.HDC to t_out.save, making t_out from ps.HDC...