Homepage: 2DStatic
| nRC | NULL: There was an error <>NULL: Everything was ok |
| x, y | top left coordinates on the dialog |
| Width, Height | Width and Height of the control |
| ID | Id of the new control |
| nRC | NULL: There was an error <>NULL: Everything was ok |
| nID | ID of the control |
| float funcx1...funcx4 | Set the scale of the Static Control |
| funcType | to Draw the Function(0) or Deferential(1) or Integral(2) |
| Str | function to draw |
; --------------- 2D-Static ---------------------------------
x = 10
y = 100
width = 140
height = 70
nID = 8
nRC := DllCall("AHKCtrlSupport\Create2DStatic", int, x, int, y, int, width, int, height, int, nID, "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
MsgBox error while calling Create2DStatic Errorlevel: %errorlevel% - RC: %nRC%
return
}
funcx1 = -15
funcx2 = 15
funcx3 = -2
funcx4 = 2
funcType = 0
func = sin(x)
nRC := DllCall("AHKCtrlSupport\Set2DStatic", int, nID, float, funcx1, float, funcx2, float, funcx3, float, funcx4, int, funcType, str, func, "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
MsgBox error while calling Set2DStatic Errorlevel: %errorlevel% - RC: %nRC%
return
}
funcx1 = -30
funcx2 = 30
funcx3 = -10
funcx4 = 300
funcType = 1
func = tan(x)
nRC := DllCall("AHKCtrlSupport\Set2DStatic", int, nID, float, funcx1, float, funcx2, float, funcx3, float, funcx4, int, funcType, str, func, "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
MsgBox error while calling Set2DStatic Errorlevel: %errorlevel% - RC: %nRC%
return
}
funcx1 = -3
funcx2 = 3
funcx3 = 0
funcx4 = 40
funcType = 2
func=3*x^2-2*x-4
nRC := DllCall("AHKCtrlSupport\Set2DStatic", int, nID, float, funcx1, float, funcx2, float, funcx3, float, funcx4, int, funcType, str, func, "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
MsgBox error while calling Set2DStatic Errorlevel: %errorlevel% - RC: %nRC%
return
}