--------------------------------------------------------------
                      [BUG/PRB.] VFP 9.0 FIX - HEADER.TOOLTIPTEXT PROPERTY
                                 January 2024
                 --------------------------------------------------------------
                                    CCB



1. BUG:

     In vfp9 SP2, we can set the Header.ToolTipText property, but sometimes VFP will not show the text.

     There is no the bug in vfp8 and vfp9 SP1.

     The bug was reported by Mr. Lu.


2. CAUSE:

     There are some BUGs in the following code.


3. RESOLUTION:

     We can write some code to fix the BUG.

     Label6008ba ::
             mov  eax , dword ptr [ ebp + 4 ]                                ;0x006008ba :        8b4504
             mov  edx , dword ptr [ ebp + 01030h ]                           ;0x006008bd :        8b9530100000
             push eax                                                        ;0x006008c3 :        50
             push edx                                                        ;0x006008c4 :        52
             mov  edx , dword ptr [ ebp + 01028h ]                           ;0x006008c5 :        8b9528100000
             pushd 09h                                                       ;0x006008cb :        6a09
             call Fun67487e                                                  ;0x006008cd :        e8ac3f0700
             mov  dword ptr [ ebp + 20 ] , eax                               ;0x006008d2 :        894514
             mov  ebx , dword ptr [ ebp + 16 ]                               ;0x006008d5 :        8b5d10


     ;
     ;                 ---------------------------------------------------
     ;                      VFP 9.0 FIX - HEADER.TOOLTIPTEXT PROPERTY
     ;                                November 2016
     ;                 ---------------------------------------------------
     ;                                     CCB
     ;
     ; We can set the Header.ToolTipText property, but sometimes VFP will not show the text.
     ;
     ; 2016/11/22, by ccb
     ;

             cmp dword ptr vfpa_sys9045_data,00h
             je Label6008d7
             lea ecx ,  dword ptr [ ebp - 20 ]
             push ecx
             lea esi ,  dword ptr [ ebp - 8 ]
             call Fun7a339c
             mov  ebx , dword ptr [ ebp - 20 ]
             mov  esi , dword ptr [ ebp - 16 ]


     Label6008d7 ::
             mov  eax , dword ptr [ ebp + 20 ]                               ;0x006008d8 :        8b4514
             test eax , eax                                                  ;0x006008db :        85c0
             jne Label600ab3                                                 ;0x006008dd :        0f85d0010000
             cmp  dword ptr [ ebp + 01030h ] , 01h                           ;0x006008e3 :        83bd3010000001
             jne Label600964                                                 ;0x006008ea :        7578
             lea ecx ,  dword ptr [ esi + 4 ]                                ;0x006008ec :        8d4e04
             mov edx , ebx                                                   ;0x006008ef :        8bd3
             call Fun50d0ed                                                  ;0x006008f1 :        e8f7c7f0ff
             mov  dword ptr [ ebp + 20 ] , 01h                               ;0x006008f6 :        c7451401000000
             jmp Label600ab3                                                 ;0x006008fd :        e9b1010000


4. APPLIES TO:

     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:
     If we enable fixing the Header.ToolTipText property, when we are moving the mouse on the Grid control,
     sometimes it causes the memory access violation exception (exception code 0xC0000005).
     Recommend to disable fixing the Header.ToolTipText property.


5. REFERENCE WEBSITES:

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

     2, foxite.com:
     https://www.foxite.com/archives/header-in-grid-and-no-tooltiptext-0000165664.htm
     https://www.foxite.com/archives/tooltips-dont-show-in-column-header-0000292886.htm
     http://weblogs.foxite.com/luisnavas/2009/03/04/simple-workaround-vfp-9-sp2-tooltiptext-on-headers-bug/

     3, microsoft.com:
     https://social.msdn.microsoft.com/Forums/en-US/3936fe65-b5bf-4d93-8303-0096fade2df0/tooltiptext-in-a-grid

     4, narkive.com:
     http://profox.leafe.narkive.com/ieRUG04M/vfp9-grid-header-tooltip


6. OTHER:

     For reference only, there is no guarantees.

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