Hi John, Thanks for the assist.
1. Yes. I have tested the return code. In a typical 32bit (PB IDE) test BringWindowToTop returned True but 64bit returned False. Similarly ShowWindow returned 24 in 32bit but 0 in 64bit.
2. I have NOT tested GetLastError. I will do so.
3. Good question. The value I am passing to BringWindowToTop is LongPtr. However, it gets its value from a string and since there is no Casting function LongPtr() I am using Long(). See code:
// double-click event in tv
longptr li_hand
ulong ll_ret
boolean lb_ret
li_hand = LONG(as_handle)
lb_ret = BringWindowToTop(li_hand)
ll_ret = ShowWindow(li_hand, 5)
// as_handle is a string containing the stringified value
// of a window.
// This was determined by the following code:
//
// longptr li_hand
//
// li_hand = handle(lw_sheet) // lw_sheet is a sheet window
// is_handle = string(li_hand) // is_handle is later used in above function
4. Does not work means the following:
In the 32-bit environment, when a treeviewitem is double-clicked, the window it is referencing (via is_handle) comes to the top and is visible. In the 64-bit environment, nothing happens after the double-click (because the BringWindowToTop call failed).
Best Regards
Larry