Highlighted
Absent Member.
Absent Member.
342 views

[archive] threads

[Migrated content. Thread originally posted on 24 July 2006]

Further to my original post regarding independent processes, I have been playing with threads recently in order to implement a 'diary reminder pop-up' process. I have had some success, but have now come to a probelm that I do not understand and cannot solve, so anyone who can help - I need it.

my main program on loading goes something like this

1......display main independent window link to thread modeless (not desroyed ) and in main thread

2......call log-on program (this program displays floating windows that are destroyed before exit)
........cancel log-on program

3......call diary pop-up program handle in thread diary-thread-handle

........the thread (thread 2) is started,the program loads correctly, displays an independent modeless window with link to thread and sits on an accept with before time

4......call menu program (this program display floating windows as required, all destroyed on exit. It also adds a menu bar to the main window which is destroyed on exit)
........loads correctly, allows window change to and from diary pop-up program
........cancels menu program

5......call program selected in the menu program (this program will display an independent window llink to thread modeless) destroys window before exit

........loads correctly, allows window change to and from diary pop-up program
........cancels program selected

6....... call menu program (effectively loops back to 4 above).

.........On the second call to this menu program, as soon as it tries to display a floating window it does it on the diary program window (thread 2) and not on main window in main thread. WHen it creates the menus, these are also on the diary window in thread 2.

I do not know why it loses the focus of the main thread window?

Regards
Keith
0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

RE: [archive] threads

I have used 'display....... upon main-independent-window handle' to get over the display problems, but the focus is still on the wrong window (i.e. the diary process window in thread 2) and the menus are still being created on this incorrect window - can I change the focus?????? and why has the focus not gone to the correct parent window when the child window in the step 5. above is destroyed?
Regards
Keith
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.