---------------------------------------------------------------------------------------------------------------------------------
                      [BUG/PRB.] VFP 9.0 FIX - DISPLAY AN ASTERISK AFTER FILE NAME ON WINDOW TITLE BAR WHEN THE MODIFY WINDOW IS IN EDIT MODE
                                  March 2024
                 ---------------------------------------------------------------------------------------------------------------------------------
                                     CCB



1. BUG:

     In vfp9 (and vfp6, vfp7, vfp8) IDE, when the MODIFY window is in edit mode,
     it will display an asterisk after file name on window title bar.

     But in vfp9 (and vfp6, vfp7, vfp8) Runtime, when the MODIFY window is in edit mode,
     it will not display an asterisk after file name on window title bar.

     In VFP Advanced IDE and VFP Advanced Runtime, when the MODIFY window is in edit mode,
     it will display an asterisk after file name on window title bar.


2. CAUSE:

     There are some BUGs in the following code.


3. RESOLUTION:

     Func080b7b :: ; proc near
             push ebp                                                        ;0x0c080b7b :        55
             mov ebp , esp                                                   ;0x0c080b7c :        8bec
             sub esp , 024h                                                  ;0x0c080b7e :        83ec24
             or  byte ptr [ ebx + 0E6h ] , 010h                              ;0x0c080b81 :        808be600000010
             or  dword ptr [ ebx + 010Ch ] , 0FFFFFFFFh                      ;0x0c080b88 :        838b0c010000ff
             push esi                                                        ;0x0c080b8f :        56
             mov  esi , dword ptr [ ebp + 8 ]                                ;0x0c080b90 :        8b7508
             push edi                                                        ;0x0c080b93 :        57
             xor edi , edi                                                   ;0x0c080b94 :        33ff
             lea eax ,  dword ptr [ ebx + 0114h ]                            ;0x0c080b96 :        8d8314010000
             cmp  esi , dword ptr [eax]                                      ;0x0c080b9c :        3b30
             mov  dword ptr [ ebp - 8 ] , edi                                ;0x0c080b9e :        897df8
             jl Labelc1d13ee                                                 ;0x0c080ba1 :        0f8c47081500

     Labelc080ba7 ::
             cmp  esi , dword ptr [ ebx + 0148h ]                            ;0x0c080ba7 :        3bb348010000
             mov  dword ptr [ ebx + 0158h ] , 0FFFFFF00h                     ;0x0c080bad :        c7835801000000ffffff
             jl Labelc1d13f6                                                 ;0x0c080bb7 :        0f8c39081500

     Labelc080bbd ::
             mov  eax , dword ptr [ ebx + 0104h ]                            ;0x0c080bbd :        8b8304010000
             mov  eax , dword ptr [eax]                                      ;0x0c080bc3 :        8b00
             cmp  esi , dword ptr [eax]                                      ;0x0c080bc5 :        3b30
             jl Labelc1d140c                                                 ;0x0c080bc7 :        0f8c3f081500

     Labelc080bcd ::
             cmp  byte ptr [ Datac41f1c4 ] , 00h                             ;0x0c080bcd :        803dc4f1410c00
             je Labelc080bef                                                 ;0x0c080bd4 :        7419


     ;
     ;                 ----------------------------------------------------------------------------------------------------------------------
     ;                      VFP 9.0 FIX - DISPLAY AN ASTERISK AFTER FILE NAME ON WINDOW TITLE BAR WHEN THE MODIFY WINDOW IS IN EDIT MODE
     ;                                  March 2024
     ;                 ----------------------------------------------------------------------------------------------------------------------
     ;                                     CCB
     ;
     ; Display an asterisk after file name on window title bar when the MODIFY window is in edit mode.
     ;
     ; 2024/3/8, by ccb
     ;

             cmp dword ptr vfpa_sys9150_data,00h
             je Labelc080bd6
             mov ecx , ebx
             call Func4e1d1b


     Labelc080bd6 ::
             test  byte ptr [ ebx + 0E6h ] , 080h                            ;0x0c080bd6 :        f683e600000080
             jne Labelc08666d                                                ;0x0c080bdd :        0f858a5a0000
             push  dword ptr [ ebp + 16 ]                                    ;0x0c080be3 :        ff7510
             push edi                                                        ;0x0c080be6 :        57
             push edi                                                        ;0x0c080be7 :        57
             push edi                                                        ;0x0c080be8 :        57

     Labelc080be9 ::
             push ebx                                                        ;0x0c080be9 :        53
             call Func08a20f                                                 ;0x0c080bea :        e820960000

     Labelc080bef ::
             pop edi                                                         ;0x0c080bef :        5f
             pop esi                                                         ;0x0c080bf0 :        5e
             leave                                                           ;0x0c080bf1 :        c9
             ret 0Ch                                                         ;0x0c080bf2 :        c20c00


4. APPLIES TO:

     VFP 6.0.8167.0
     VFP 6.0.8961.0 (SP5)

     VFP 7.0.0.9262
     VFP 7.0.0.9465 (SP1)

     VFP 8.0.0.2521
     VFP 8.0.0.3117 (SP1)

     VFP 9.0.0.2412
     VFP 9.0.0.3504 (SP1)
     VFP 9.0.0.4611 (SP2)
     VFP 9.0.0.5015 (SP2)
     VFP 9.0.0.5411 (SP2)
     VFP 9.0.0.5721 (SP2)
     VFP 9.0.0.5815 (SP2)
     VFP 9.0.0.6303 (SP2)
     VFP 9.0.0.6602 (SP2)
     VFP 9.0.0.7423 (SP2)

     The bug has been fixed in VFP Advanced.

     IMPORTANT NOTE:
     All MODIFY commands are available in VFP IDE.

     The following MODIFY commands are available in VFP Runtime:
     MODIFY COMMAND command
     MODIFY FILE command
     MODIFY GENERAL command
     MODIFY LABEL command
     MODIFY MEMO command
     MODIFY REPORT command
     MODIFY STRUCTURE command
     MODIFY WINDOW command

     The following MODIFY commands are not available in VFP Runtime:
     MODIFY CLASS command
     MODIFY CONNECTION command
     MODIFY DATABASE command
     MODIFY FORM command
     MODIFY MENU command
     MODIFY PROCEDURE command
     MODIFY PROJECT command
     MODIFY QUERY command
     MODIFY SCREEN command
     MODIFY VIEW command

     All MODIFY commands are not available in VFP Multi-threaded Runtime.


5. REFERENCE WEBSITES:

     1, baiyujia.com:
     http://www.baiyujia.com
     http://www.baiyujia.com/vfpdocuments/f_vfp9fix314.asp


6. OTHER:

     For reference only, there is no guarantees.

     Any questions or suggestions, please send me an email at ccb2000@163.com.