Homepage: Wall Clock Control
| nRC | NULL: error <>NULL: 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: error <>NULL: ok |
| nID | ID of the control |
| 0 | 1 | 0: stop clock | 1: start clock |
| nRC | NULL: error <>NULL: ok |
| nID | ID of the control |
| BGR-color | Text color |
| BGR-color | Tick color |
| BGR-color | dial color |
| BGR-color | hand color |
| nRC | NULL: error <>NULL: ok |
| nID | ID of the control |
| int | 0 = do not show the date 1 = show the date |
| nRC | NULL: error <>NULL: ok |
| nID | ID of the control |
| Rest of parameters | Have a look at that site: CFont::CreateFont |
; --------------- Analog Clock -Static ---------------------------------
x = 10
y = 160
width = 150
height = 150
nID = 10
nRC := DllCall("AHKCtrlSupport\CreateWallClockStatic", int, x, int, y, int, width, int, height, int, nID, "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
MsgBox error while calling CreateWallClockStatic Errorlevel: %errorlevel% - RC: %nRC%
return
}
nRC := DllCall("AHKCtrlSupport\WallClockStaticStart", int, nID, int, 1, "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
MsgBox error while calling WallClockStaticStart Errorlevel: %errorlevel% - RC: %nRC%
return
}
nRC := DllCall("AHKCtrlSupport\WallClockStaticColor", int, nID, int, 0x003333, int, 0xeeeeee, int, 0xffffaa, int, 0x228822, "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
MsgBox error while calling WallClockStaticColor Errorlevel: %errorlevel% - RC: %nRC%
return
}
;0 = do not show the date - 1 = show the date
nRC := DllCall("AHKCtrlSupport\WallClockStaticSet", int, nID, int, 0, "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
MsgBox error while calling WallClockStaticColor Errorlevel: %errorlevel% - RC: %nRC%
return
}
;Set the font for the clock-numbers 1-12
nHeight = 100
nWidth = 50
nEscapement = 0
nOrientation = 0
nWeight = 400
nItalic = 0
nUnderline = 1
nStrikeout = 0
nCharSet = 0
nOutPrec = 0
nClipPrec = 0
nQuali = 0
nPitch = 0
szFontName = Arial
nRC := DllCall("AHKCtrlSupport\WallClockStaticSetFont", int, nID, int, nHeight, int, nWidth,
int, nEscapement, int, nOrientation, int, nWeight, int, nItalic, int, nUnderline, int, nStrikeout,
int, nCharSet, int, nOutPrec, int, nClipPrec, int, nQuali, int, nPitch, str, "Arial", "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
MsgBox error while calling WallClockStaticSetFont Errorlevel: %errorlevel% - RC: %nRC%
return
}