Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Console window and dialog interface

Jerry
Beginner
473 Views
I have created an extenstive dialog routine which interfaces with a child process. This child processinherits the console window allocated by the main dialog routine. As the child process execution make take some time, the user can proceed to do other functions in windows. The problem I have is that when the user selects a another windows application, such as Excel and that window is active, and then he brings selects my dialog application to become active,the console window associated with the dialog does not come forward. The user has to seperately select the window to bring it forward. Is there a way to associated the consloe window with the dialog so that once the dialog is selected by the user, to the foreground, the console window will also come forward?
0 Kudos
1 Reply
jimdempseyatthecove
Honored Contributor III
473 Views
I have created an extenstive dialog routine which interfaces with a child process. This child processinherits the console window allocated by the main dialog routine. As the child process execution make take some time, the user can proceed to do other functions in windows. The problem I have is that when the user selects a another windows application, such as Excel and that window is active, and then he brings selects my dialog application to become active,the console window associated with the dialog does not come forward. The user has to seperately select the window to bring it forward. Is there a way to associated the consloe window with the dialog so that once the dialog is selected by the user, to the foreground, the console window will also come forward?

One of the others may have a specific suggestion but I think you can do the following

In the OnFocus routine of dialog associated with the child window you can request that the child window be brought to top (requires you have handle to child window), then you can requiest to have the dilog brought to top. (or position windows so both are visible.) Note, you will have to have a flag to keep from one OnFocus to enter into an infinite loop. A timer counter would do. e.g. do not do second window dance within 1ms of prior dance.

Jim Dempsey
0 Kudos
Reply