David Chua
10-19-2006, 03:09 PM
When using Visual Form Builder to generate code, I notice that a line of code "local(wmId$, wmEvent$);" is always place inside the case structure. As a result, it generates an error when compile or run. The whole generated by the Builder look like this:
func FORM100Proc (hWnd$, Msg$, wParam$, lParam$)
local(ok$);
ok$ = true;
case(Msg$)
WM_COMMAND:
local(wmId$, wmEvent$);
wmId$ = loword(wParam$);
wmEvent$ = HIWORD(wParam$);
case(wmId$)
5001: // Exit
PostMessage(hWnd$, WM_CLOSE, 0, 0);
return(false);
end;
// insert code here
end;
return (ok$);
end;
It works OK if I move the line "local(wmId$, wmEvent$);" above (outside) the case structure. Is this a bug or something that I've done wrong?
Cheers.
func FORM100Proc (hWnd$, Msg$, wParam$, lParam$)
local(ok$);
ok$ = true;
case(Msg$)
WM_COMMAND:
local(wmId$, wmEvent$);
wmId$ = loword(wParam$);
wmEvent$ = HIWORD(wParam$);
case(wmId$)
5001: // Exit
PostMessage(hWnd$, WM_CLOSE, 0, 0);
return(false);
end;
// insert code here
end;
return (ok$);
end;
It works OK if I move the line "local(wmId$, wmEvent$);" above (outside) the case structure. Is this a bug or something that I've done wrong?
Cheers.