----------------------------------------------------------------------------------------------------------------
                      [BUG/PRB.] VFP 9.0 FIX - WINDOWS XP THEMES SUPPORT FOR A WINDOW CREATED WITH THE DEFINE WINDOW COMMAND
                                  April 2024
                 ----------------------------------------------------------------------------------------------------------------
                                     CCB



1. BUG:

     In vfp9 (and vfp8), for a window created with the DEFINE WINDOW command,
     the default setting of the Form.Themes property is true (.T.).

     In Visual FoxPro Advanced, for a window created with the DEFINE WINDOW command,
     the default setting of the Form.Themes property is false (.F.).


2. CAUSE:

     There are some BUGs in the following code.


3. RESOLUTION:

     Label70a4d3 ::
             lea eax ,  dword ptr [ ebp + 120 ]                              ;0x0070a4d3 :        8d4578
             push eax                                                        ;0x0070a4d6 :        50
             lea eax ,  dword ptr [ ebp + 0FFFFFF08h ]                       ;0x0070a4d7 :        8d8508ffffff
             push eax                                                        ;0x0070a4dd :        50
             push ebx                                                        ;0x0070a4de :        53
             push edi                                                        ;0x0070a4df :        57
             push edi                                                        ;0x0070a4e0 :        57
             pushd 0332h                                                     ;0x0070a4e1 :        6832030000
             call Fun42960d                                                  ;0x0070a4e6 :        e822f1d1ff
             add esp , 018h                                                  ;0x0070a4eb :        83c418
             cmp  dword ptr [ ebp + 120 ] , edi                              ;0x0070a4ee :        397d78
             jne Label70a4fd                                                 ;0x0070a4f1 :        750a
             mov ecx , 0B6h                                                  ;0x0070a4f3 :        b9b6000000
             call Fun544742                                                  ;0x0070a4f8 :        e845a2e3ff

     Label70a4fd ::


     ;
     ;                 -----------------------------------------------------------------------------------------------------
     ;                      VFP 9.0 FIX - WINDOWS XP THEMES SUPPORT FOR A WINDOW CREATED WITH THE DEFINE WINDOW COMMAND
     ;                                  April 2024
     ;                 -----------------------------------------------------------------------------------------------------
     ;                                     CCB
     ;
     ; In vfp9 (and vfp8), for a window created with the DEFINE WINDOW command,
     ; the default setting of the Form.Themes property is true (.T.).
     ; In Visual FoxPro Advanced, for a window created with the DEFINE WINDOW command,
     ; the default setting of the Form.Themes property is false (.F.).
     ;
     ; 2024/4/5, by ccb
     ;

             cmp dword ptr vfpa_sys9154_data,00h
             jne Label70a4fe
             mov  eax , dword ptr [ ebp + 120 ]
             mov  eax , dword ptr [eax]
             mov  ecx , dword ptr [ eax + 0150h ]
             pushd 00h
             mov edx , 02A5h
             call Fun44168e


     Label70a4fe ::
             mov  eax , dword ptr [ ebp + 120 ]                              ;0x0070a4fd :        8b4578
             mov  eax , dword ptr [eax]                                      ;0x0070a500 :        8b00
             mov  ecx , dword ptr [ eax + 0150h ]                            ;0x0070a502 :        8b8850010000
             push edi                                                        ;0x0070a508 :        57
             mov edx , 015Bh                                                 ;0x0070a509 :        ba5b010000
             call Fun44168e                                                  ;0x0070a50e :        e87b71d3ff
             mov  eax , dword ptr [ ebp + 120 ]                              ;0x0070a513 :        8b4578
             mov  eax , dword ptr [eax]                                      ;0x0070a516 :        8b00
             mov  ecx , dword ptr [ eax + 0150h ]                            ;0x0070a518 :        8b8850010000
             pushd 02h                                                       ;0x0070a51e :        6a02
             mov edx , 019Bh                                                 ;0x0070a520 :        ba9b010000
             call Fun44168e                                                  ;0x0070a525 :        e86471d3ff

     Label70a52a ::
             mov  eax , dword ptr [ ebp + 120 ]                              ;0x0070a52a :        8b4578
             mov  eax , dword ptr [eax]                                      ;0x0070a52d :        8b00
             mov  ecx , dword ptr [ eax + 0150h ]                            ;0x0070a52f :        8b8850010000
             pushd 01h                                                       ;0x0070a535 :        6a01
             pushd 063h                                                      ;0x0070a537 :        6a63
             pop edx                                                         ;0x0070a539 :        5a
             call Fun44168e                                                  ;0x0070a53a :        e84f71d3ff
             mov  eax , dword ptr [ ebp + 120 ]                              ;0x0070a53f :        8b4578
             mov  eax , dword ptr [eax]                                      ;0x0070a542 :        8b00
             mov  ecx , dword ptr [ eax + 0150h ]                            ;0x0070a544 :        8b8850010000
             push edi                                                        ;0x0070a54a :        57
             pushd 064h                                                      ;0x0070a54b :        6a64
             pop edx                                                         ;0x0070a54d :        5a
             call Fun44168e                                                  ;0x0070a54e :        e83b71d3ff
             jmp Label70a685                                                 ;0x0070a553 :        e92d010000


4. APPLIES TO:

     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.


5. REFERENCE WEBSITES:

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


6. OTHER:

     For reference only, there is no guarantees.

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