Results 1 to 6 of 6

Thread: FindWindowEx Prob

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Dunmow,Essex,England
    Posts
    898

    FindWindowEx Prob

    Hi All,

    I have the following code set in a form load event

    FrameHwnd = FindWindowEx(Me.hwnd, 0&, "ThunderFrame", vbNullString)
    calendarEndHwnd = FindWindowEx(FrameHwnd, 0&, "CalendarWndClass", vbNullString)
    calendarStartHwnd = FindWindowEx(FrameHwnd, calendarEndHwnd, "CalendarWndClass", vbNullString)
    cboMonthEndHwnd = FindWindowEx(calendarEndHwnd, 0&, "ComboBox", vbNullString)
    cboYearEndHwnd = FindWindowEx(calendarEndHwnd, cboMonthEndHwnd, "ComboBox", vbNullString)
    cboMonthStartHwnd = FindWindowEx(calendarStartHwnd, 0&, "ComboBox", vbNullString)
    cboYearStartHwnd = FindWindowEx(calendarStartHwnd, cboMonthStartHwnd, "ComboBox", vbNullString)
    ActCalHwnd = FindWindowEx(Me.hwnd, 0&, "CalendarWndClass", vbNullString)
    cboActMonthHwnd = FindWindowEx(ActCalHwnd, 0&, "ComboBox", vbNullString)
    cboActYearHwnd = FindWindowEx(ActCalHwnd, cboActMonthHwnd, "ComboBox", vbNullString)


    This all works fine in a development environment both under W2K and 95. Running the compiled project on a 95 machine and it does not find the handle to set cboYearStartHwnd. The value is 0.

    Does anybody have any ideas why this is so.

    Regards
    Bill Crawley

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Dunmow,Essex,England
    Posts
    898

    on Further investigation

    Hi All,

    On further investigation. It really looks like the problem stems from the ThinderFrame class on the first line since the frame's handle is not Being found. I also found this to be the case when the compiled version is run on W2k. SO it all works fine in a dev environment, but as soon as it goes to a deployed state the Frame handle cannot be found.

    Regards
    Bill

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Do you know why the handle can't be found?

    I only ask this because someone else, at some point, may run into the same issue.

  4. #4
    jim mcnamara
    Guest
    The Frame.hWnd property exists, therefore frames do have window handles. Why are you messing with all these FindWindowEx calls? This must be for another window, is the only answer.

    Since you seem to be getting everything in the window or form, why not use EnumChildWindows instead? You do not have to know the class names, or worry about mispelling them.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Dunmow,Essex,England
    Posts
    898

    Answer

    In the Dev Environment, I use ThunderFrame. When Compiled windows looks for ThunderRT6Frame. Somebody shoot the guy at Microsoft who thought of this obsured thing.

    Regards
    Bill Crawley

  6. #6
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    *hate that friggin sprinks thing*

    yeah, that's a pain, how the class names change after compilation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width