PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: JR Heathcote on February 18, 2006, 11:51:44 PM

Title: A Toolbar Edit Bug
Post by: JR Heathcote on February 18, 2006, 11:51:44 PM
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."
Title: A Toolbar Edit Bug
Post by: TechSupport on February 19, 2006, 11:40:49 AM
Right you are. Strange. I will check into the cause of this GPF.

Thanks for pointing this out.
Title: A Toolbar Edit Bug
Post by: TechSupport on February 19, 2006, 12:48:30 PM
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. :)
Title: A Toolbar Edit Bug
Post by: JR Heathcote on February 19, 2006, 09:37:38 PM
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.
Title: A Toolbar Edit Bug
Post by: TechSupport on February 19, 2006, 10:03:14 PM
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
Title: A Toolbar Edit Bug
Post by: JR Heathcote on February 22, 2006, 12:29:46 AM
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.
Title: A Toolbar Edit Bug
Post by: TechSupport on February 24, 2006, 11:27:02 AM
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.