next one. this could be the idea of a background to create a control. the "control" must be defined with own function and "add" and "button" function separately too. I will see if there's a change to make it as a chapter for learning about module handling and parsing. it's not very important to get feedback anymore here for this topic, as there wasn't any answer about this interesting stuff
' Empty GUI script created on 11-23-2011 11:07:42 by (ThinAIR)
Uses "console", "UI"
Function TBMain () As Long
Local hDlg As Long
Local mystyle As Long
Local mytest As Long
Local strx As String
strx = "my push Button!"
mytest = pushButton(hDlg,100,100,250,350,strx, mystyle)
End Function
Sub PushButton( ByVal cid As Long, _
ByVal x As Long, _
ByVal y As Long, _
ByVal cx As Long, _
ByVal cy As Long, _
ByRef caption As String, _
ByVal styles As Long )
styles = 0
MsgBox 0, "test my pushbutton"
'Controls( cid, x, y, cx, cy, caption, 0, "BUTTON", _
' %BS_PUSHBUTTON Or styles )
End Sub
after that it may be possible to create command something like "newControl" with fictive (pseudo code) code :
'Declaration
SUB NewCONTROL ( _
parent AS CONTROL, _
text AS STRING, _
left AS INTEGER, _
top AS INTEGER, _
width AS INTEGER, _
height AS INTEGER _
)
END SUB
addendum:
1) Controls are basic building blocks of a windows application.
CreateWindow(TEXT("STATIC"), lyrics,
WS_CHILD | WS_VISIBLE | SS_LEFT,
20, 20, 300, 230,
hwnd, (HMENU) 1, NULL, NULL)
Here we create the static control. We display text. It is aligned to the left.
2) Static control:
"Button"
A button is a simple control. It has a text label. It is used to trigger an action.
bye, largo
Bookmarks