Skip to content

happy new year pal build 485

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #186689
    light 2012
    Member

    happy new year

    #186698
    Chike
    Member

    A bit on that no?

    #186697
    light 2012
    Member

    I don’t understand Chike :(!


    What is wrong with this code? plz

    Function NickGet()
    
    Dim dlggroupchatwindowclass As Long, splitterwindowex As Long, classcpanecontainerex As Long
    Dim atlaae As Long, atlaaed As Long, syslistview As Long
    dlggroupchatwindowclass = FindWindow("dlggroupchat window class", Form1.Combo1.Text)
    splitterwindowex = FindWindowEx(dlggroupchatwindowclass, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    classcpanecontainerex = FindWindowEx(splitterwindowex, 0&, "classcpanecontainerex", vbNullString)
    classcpanecontainerex = FindWindowEx(splitterwindowex, classcpanecontainerex, "classcpanecontainerex", vbNullString)
    atlaae = FindWindowEx(classcpanecontainerex, 0&, "atl:00a1ae40", vbNullString)
    atlaaed = FindWindowEx(atlaae, 0&, "atl:00a1aed0", vbNullString)
    atlaaed = GetWindow(atlaaed, GW_CHILD)
    syslistview = FindWindowEx(atlaaed, 0&, "syslistview32", vbNullString)
    Call GetListviewItem(syslistview)
    End Function

     

    #186696
    Chike
    Member

    You have a debugger? Use it.

    #186695
    light 2012
    Member

    What do you mean debugger?

    #186694
    Chike
    Member

    Your IDE wether its VB6 or VB.NET has an integrated debugger.
    You set a breakpoint where you want the program to stop execution and examin variables, and then you can walk by steps each line untill you find where the problem is.

    If you are looking for syslistview42 a much better way to look for it is with EnumChildWindows.
    Since it’s there is only one window with this class its very easy to find.

    #186693
    light 2012
    Member

    i know ,but this code don’t work with pal build 485

    Private Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As String) As Long
    Dim strCaption As String
    Dim lLen As Long
    Dim syslistview As Long, cwndmembertree As Long
    Dim dlggroupchatwindowclass As Long, splitterwindowex As Long, classcpanecontainerex As Long
    Dim atlaae As Long, atlaaed As Long
    dlggroupchatwindowclass = FindWindow("dlggroupchat window class", Form1.Combo1.Text)
    splitterwindowex = FindWindowEx(dlggroupchatwindowclass, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    classcpanecontainerex = FindWindowEx(splitterwindowex, 0&, "classcpanecontainerex", vbNullString)
    classcpanecontainerex = FindWindowEx(splitterwindowex, classcpanecontainerex, "classcpanecontainerex", vbNullString)
    atlaae = FindWindowEx(classcpanecontainerex, 0&, "atl:00a1ae40", vbNullString)
    atlaaed = FindWindowEx(atlaae, 0&, "atl:00a1aed0", vbNullString)
    hWndlvw = FindWindowEx(atlaaed, 0&, "syslistview32", vbNullString)
    
    ' If we've found a window with the SysListView32 class
    ' check to see if parent window caption is the one we are looking for
    If hWndlvw 0 Then
    lLen = GetWindowTextLength(hwnd)
    If lLen > 0 Then
    strCaption = Space(lLen)
    GetWindowText hwnd, strCaption, lLen + 1
    End If
    End If
    EnumWindowsProc = (hWndlvw = 0 And strCaption lParam)
    End Function

     

    #186692
    String
    Member

    @light 2012 wrote:

    What is wrong with this code? plz

    If you have a programming question, start a new thread in the programming section.

    #186691
    Chike
    Member

    He did, just was no programing question in it when he first posted, i’ll move it back.

    And that code doesn’t work for the same reason the first one doesn’t, they both depend on the order and arrangment of child windows.

    EnumWindoesProc function should not have FindWindow or FindWindowEx in it at all.
    All you need to do is
    a. find the room window
    b. enumerate child windows, stop enumeration when windows class SysListView32 is found, oe not.

    The EnumChildProc should pass the window handle via the lParam (should be address of a pointer), don’t use global variables.

    #186690
    String
    Member

    @Chike wrote:

    He did, just was no programing question in it when he first posted

    oh, lol.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.