X-Git-Url: https://sfsrealm.hopto.org/projects/?a=blobdiff_plain;f=grpapi%2FGrpApi.bas;h=1df20862abd121fcb96ed7e49f704509b0ecfb13;hb=master;hp=1f6b6f14b073afd206d140dd1c9b596ff7ce8f6a;hpb=4d7b76a0306a5577bc7b2dd3264e75ea419f6942;p=grpapi.git diff --git a/grpapi/GrpApi.bas b/grpapi/GrpApi.bas index 1f6b6f1..1df2086 100644 --- a/grpapi/GrpApi.bas +++ b/grpapi/GrpApi.bas @@ -1,7 +1,8 @@ Attribute VB_Name = "GrpApi" Option Explicit -' ShadowFlare GRP Library. (c) ShadowFlare Software 2002-2006 +' ShadowFlare GRP Library. (c) ShadowFlare Software 2002-2008 +' License information for this code is in license.txt ' Any comments or suggestions are accepted at blakflare@hotmail.com (ShadowFlare) @@ -40,6 +41,7 @@ Declare Function LoadGrp Lib "Grpapi.dll" (ByVal lpFileName As String) As Long Declare Function DestroyGrp Lib "Grpapi.dll" (ByVal hGrp As Long) As Boolean Declare Function DrawGrp Lib "Grpapi.dll" (ByVal hGrp As Long, ByVal hdcDest As Long, ByVal nXDest As Long, ByVal nYDest As Long, ByVal nFrame As Integer, dwPalette As Long, ByVal dwFlags As Long, ByVal dwAlpha As Long) As Boolean Declare Function GetGrpInfo Lib "Grpapi.dll" (ByVal hGrp As Long, GrpInfo As GRPHEADER) As Boolean +Declare Function GetGrpFrameInfo Lib "Grpapi.dll" (ByVal hGrp As Long, ByVal nFrame As Integer, ByRef nLeft As Long, ByRef nTop As Long, ByRef nWidth As Long, ByRef nHeight As Long) As Boolean Declare Function GetDC Lib "User32.dll" (ByVal hWnd As Long) As Long Declare Function ReleaseDC Lib "User32.dll" (ByVal hWnd As Long, ByVal hDC As Long) As Long @@ -80,18 +82,18 @@ Declare Sub CopyMemory Lib "Kernel32.dll" _ ' ' The functions must be in this form: ' -' Function GetPixelProc (ByRef value As any_type, X As Long, Y As Long) As Long -' Sub SetPixelProc (ByRef value As any_type, X As Long, Y As Long, clrColor As Long) +' Function GetPixelProc (ByRef value As any_type, ByVal X As Long, ByVal Y As Long) As Long +' Sub SetPixelProc (ByRef value As any_type, ByVal X As Long, ByVal Y As Long, ByVal clrColor As Long) ' ' or ' -' Function GetPixelProc (ByVal value As any_type, X As Long, Y As Long) As Long -' Sub SetPixelProc (ByVal value As any_type, X As Long, Y As Long, clrColor As Long) +' Function GetPixelProc (ByVal value As any_type, ByVal X As Long, ByVal Y As Long) As Long +' Sub SetPixelProc (ByVal value As any_type, ByVal X As Long, ByVal Y As Long, ByVal clrColor As Long) ' -' Replace "any_type" with whatever type you want. This parameter gets the data from -' DrawGrp's hdcDest parameter. You can either pass a number to DrawGrp and use the -' "ByVal" versions of the above functions, or you can use AddressOf to get a reference -' to a variable and use it for the "ByRef" versions. +' Replace "any_type" with whatever type you want (but must be 4 bytes long if ByVal). +' This parameter gets the data from DrawGrp's hdcDest parameter. You can either pass +' a number to DrawGrp and use the "ByVal" versions of the above functions, or you can +' use AddressOf to get a reference to a variable and use it for the "ByRef" versions. ' GetPixelProc should return an RGB color value. Declare Sub SetFunctionGetPixel Lib "Grpapi.dll" (lpGetPixelProc As Long) Declare Sub SetFunctionSetPixel Lib "Grpapi.dll" (lpSetPixelProc As Long)