Tooltip Manager ( customize the default PB tooltip )

Share your advanced PureBasic knowledge/code with the community.
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

Fred is right, the EnumWindowsProc takes only 2 parameters.
Heres the one that TailBite uses :

Code: Select all

  Structure FindProcInfo
    Terminate.l
    ProcessName$
    FindText$
    NoText$
  EndStructure
 
  Procedure EnumWindowsProc(hWnd, *lParam.FindProcInfo)
    Protected result.l,*szBuffer,WText$
    
    result = #True
    *szBuffer = AllocateMemory(1024)
    GetWindowText_(hWnd, *szBuffer, 1024)
    WText$ = PeekS(*szBuffer)
    FreeMemory(*szBuffer)
    If Left(WText$, Len(*lParam\FindText$))=*lParam\FindText$
      If WText$<>*lParam\NoText$
        hIDE = hWnd
        GetProcessListResult$ = Right(WText$, Len(WText$)-Len(*lParam\FindText$))
        result = #False
      EndIf
    EndIf
    ProcedureReturn result
  EndProcedure
harff182
Enthusiast
Enthusiast
Posts: 105
Joined: Thu Dec 08, 2005 4:58 pm
Location: Duesseldorf, Germany

Post by harff182 »

eddy wrote:I see no problem with the last version
The problem is an IMA at line 65: "EnumWindows_(@CreateTooltipManager(), #PB_Ignore)".
It says: Invalid memory access. (read error at address 220)
Sorry 4 my poor English, it's the only one I learned 40 years ago...
since 17.12.08: XPHome(SP3) + PB 4.30
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

ok i'll fix that
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

[FIXED]
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
harff182
Enthusiast
Enthusiast
Posts: 105
Joined: Thu Dec 08, 2005 4:58 pm
Location: Duesseldorf, Germany

Post by harff182 »

eddy wrote:[FIXED]
Thanks, no probs anymore :P
Sorry 4 my poor English, it's the only one I learned 40 years ago...
since 17.12.08: XPHome(SP3) + PB 4.30
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

Update for PB4.30b1
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
Post Reply