sandyrepope
30-06-2007, 23:34
I'm getting a strange error with I run the following script. It says in the line that should add a button:
error code 4
error description equal sign expected
line 20
token found hDlg
I'm probably making some kind of simple error but I can't figure out what I'm doing wrong.
Help!!!
uses "UI"
USES "File"
dim hDlg AS long
dim Msg AS LONG
dim wParam AS LONG
dim lParam AS LONG
'---Set starting width and height of the window
dim wx as long = 500
dim hy as long = 300
DIALOG NEW 0, "Month Calendar", -1, -1, wx, hy, _
%WS_DLGFRAME OR %DS_CENTER OR %WS_CAPTION OR %WS_SYSMENU OR %WS_OVERLAPPEDWINDOW, _
0 TO hDlg
' ** Display the dialog
DIALOG SHOW modeless hDlg
control add button hDlg, 1101, "", 7, 125, 43, 43
WHILE IsWindow(hDlg)
'---Get the message and fill wParam and lParam
Msg = GetMessage(hDlg, wParam, lParam)
'---Now test the message
SELECT CASE Msg
case %WM_Command
select case wParam
case %ID_EXIT
exit while
end select
CASE %WM_SYSCOMMAND
SELECT CASE wParam
CASE %SC_CLOSE
EXIT WHILE
END SELECT
case else
end select
wend
DIALOG END hDlg
Thanks
Sandy
error code 4
error description equal sign expected
line 20
token found hDlg
I'm probably making some kind of simple error but I can't figure out what I'm doing wrong.
Help!!!
uses "UI"
USES "File"
dim hDlg AS long
dim Msg AS LONG
dim wParam AS LONG
dim lParam AS LONG
'---Set starting width and height of the window
dim wx as long = 500
dim hy as long = 300
DIALOG NEW 0, "Month Calendar", -1, -1, wx, hy, _
%WS_DLGFRAME OR %DS_CENTER OR %WS_CAPTION OR %WS_SYSMENU OR %WS_OVERLAPPEDWINDOW, _
0 TO hDlg
' ** Display the dialog
DIALOG SHOW modeless hDlg
control add button hDlg, 1101, "", 7, 125, 43, 43
WHILE IsWindow(hDlg)
'---Get the message and fill wParam and lParam
Msg = GetMessage(hDlg, wParam, lParam)
'---Now test the message
SELECT CASE Msg
case %WM_Command
select case wParam
case %ID_EXIT
exit while
end select
CASE %WM_SYSCOMMAND
SELECT CASE wParam
CASE %SC_CLOSE
EXIT WHILE
END SELECT
case else
end select
wend
DIALOG END hDlg
Thanks
Sandy