I get an error when editing the MDI form example. Try clicking on the toolbar graphic on the dialog box to invoke the Toolbar Editor then "Cancel" out of the editor. Do this twice and the following error generated:
"Error: Access violation at 0x7C9106C3 (tried to write to 0x00450052), program terminated."
Right you are. Strange. I will check into the cause of this GPF.
Thanks for pointing this out.
I am pretty sure that I found the source of the problem. I have uploaded a new FFengine.exe for you to try.
http://www.planetsquires.com/files/FFengine.zip
BTW, FireFly3 has a brand new ToolBar Editor that is easier to use than the current one. :)
Yes, the new version of FFengine.exe seems to work.
However, in trying to compile the MDI example I get an error 519 - Missing Declaration in module "MDIFORM_CODEPROCEDURE" for the %WM_CLOSE message:
FF_nResult = MDIFORM_MDICLIENT_WM_CLOSE (hWndForm)
hWndForm should be hWndControl.
I haven't had trouble compiling. ???
Download the following files and try compiling them. Do they fail as well?
http://www.planetsquires.com/files/MDI.zip
Yes and No.
I can compile the example right out of the box OK, but when I change something in the MDIForm.inc file, such as indenting the text, the compile fails. The error is in one of the Firefly generated modules:
CODEGEN_MDIEXAMPLE_MDIFORM_FORM.INC
In the function:
FUNCTION MDIFORM_CODEPROCEDURE (BYVAL hWndControl AS DWORD, BYVAL wMsg AS DWORD, _
BYVAL wParam AS DWORD, BYVAL lParam AS LONG) AS LONG
The following code in the above function generates the error:
'The following case calls each user defined function.
SELECT CASE wMsg
CASE %WM_CLOSE
IF GetDlgCtrlId(hWndControl) = IDC_MDIFORM_MDICLIENT THEN
FF_ControlIndex = 0
FF_nResult = MDIFORM_MDICLIENT_WM_CLOSE (hWndForm)
IF FF_nResult THEN FUNCTION = FF_nResult: EXIT FUNCTION
END IF
The function CALL:
MDIFORM_MDICLIENT_WM_CLOSE (hWndForm)
Should read:
MDIFORM_MDICLIENT_WM_CLOSE (hWndControl)
I can change the above function call to use the correct variable, but as soon as I make any further changes Firefly regenerates the above module with the incorrect variable usage.
Ah, yes, I see it now.... Whenever the WM_CLOSE message is added to your code edit window for the MDICLIENT then incorrect code gets generated to the CODEGEN_*.INC file (i.e. MDIFORM_MDICLIENT_WM_CLOSE)
Are you actually using the WM_CLOSE message in your code? Can you safely delete it from the code editor (i.e. maybe it contains no code anyway). Most WM_CLOSE requests need to be handled by your MDIForm rather than the MDIClient anyway.
I will add this to the bug list in order to be fixed.