I am trying to get to grips with how iGrid functions by working through the Samples.
CellButtons requires a number of WIN API functions to be declared in a VBA environment:
So far I have made the following declarations:
Public Declare Function DrawFrameControl Lib "user32" (ByVal hdc As Long, lpRect As Rect, ByVal uType As Long, ByVal uState As Long) As Long
Public Declare Function InflateRect Lib "user32" (lpRect As Rect, ByVal x As Long, ByVal y As Long) As Long
Public Declare Function OffsetRect Lib "user32" (lpRect As Rect, ByVal x As Long, ByVal y As Long) As Long
Public Declare Function SetTextColor Lib "user32" (ByVal hdc As Long, ByVal crColor As Long) As Long
The first 3 work OK, but when calling SetTextColor I get the following Message:
"Can't find dll entry point for SetTextColor in user32."
I actually called it through the following little test routine:
Sub TestColor()
Dim hdc, crColor As Long
crColor = RGB(150, 0, 0)
SetTextColor hdc, crColor
End Sub
Does the problem occur because of my definition? If so how should it be defined? Also how should TranslateColor and DrawText be declared?