closing all child window on close of parent window - destroy

I have first frame in which i add second frame/panel, third frame/panel and fourth frame/panel.
I open first frame then second frame,third frame and fourth frame.
when I close first frame other three frames are still open .
I want that all other added frames should be close on closing of first frame.
Is there any way to resolve this issue.Urgent.

Related

Move text cursor to lines that are not visible in screen using C++

I'm currently writing a C++ console application that runs an optimization routine. It runs several processes in parallel and as it takes some hours to finish, I created a kind of monitor to follow the processes evolution. I implemented this by means of printing a table in screen and every time that a process step is changed the text cursor is moved to the row referent to that process and the older text is overwritten by the newer.
To do the movement through the table rows I used "\n" for moving the text cursor a row down and the ESC character "\033[F" for moving the cursor a row up.
The problem is that sometimes the table has a number of rows greater than the number of lines that fit in screen, so some rows stay hidden and one needs scrolling the screen to see them. When application moves the text cursor up or down, it cannot go until the lines that are hidden, stopping at the first or last visible lines, respectively. I would like to know if there is some way of access the lines that are beyond the visible screen area.
For Windows, take a look at this under <Windows.h> ,
HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hStdout, { 20, 4 });
Where, "4" refers to row (or line for better understanding) and "20" refers to column (or cursor position on line).

RPG Maker MV - Checking which frame of a character sheet is currently active

I have a character sheet for the player that triggers when they are idle for a while. The sheet has them going from standing to laying down in 6 frames, sleeping for 3 frames and then standing back up in 7 frames.
I'm looking to pause the animation when it reaches the 9th frame without using timers (as the character sheet may change in the future). Is there a function that will let me query which animation frame is currently being displayed?
Alternatively, is there a way to know if a character sheet has reached the last frame and is about to return to the first frame. I need to know when this animation has finished a cycle so I can smoothly transition back into the walking animation.
I'm extending Modern Algebra's ExtraMovementFrames plugin, so the solution ended up being to capture the output of this:
var patternIndex = (this._pattern % this.emfCharacterState().pattern.length);
which uses the ._pattern property of the player, modulo the length of the animation.
I then used this.setStepAnime(false); to pause the walking animation of the character once it reached the desired frame.
Also asked this on the rpg maker mv forums: https://forums.rpgmakerweb.com/index.php?threads/checking-which-frame-of-a-character-sheet-is-currently-active.115662/

wx.PopupWindow without calling Frame

I've searched around and all the wx.Popupwindow requires the frame to be setup. Is it possible to create a pop window in wx without using frame to launch it?
Because I just need the Popup Window excluding the frame to show up.

Restore override cursor not for entire application

I have a large application with many widgets and windows.
At some moment I restore the cursor for entire application.
I need to keep it "customised" (as it was) for one frame.
I set it for the frame to be "customised" again, but it still restores for 1 millisecond and it is noticeable.
So the states of my cursor are: "Customised" - "Normal" - "Customised".
How can I skip changing cursor for one(current) frame? But restore it for all other windows (so it is normal again)?
Restore override cursor for all application, but set cursor to your frame.
Use setCursor() method.
http://qt-project.org/doc/qt-4.8/qwidget.html#cursor-prop
As documentation said about setOverrideCursor():
This cursor will be displayed in all the application's widgets until restoreOverrideCursor() or another setOverrideCursor() is called.
http://qt-project.org/doc/qt-4.8/qapplication.html#setOverrideCursor
So you can't restore cursor for all widgets instead of one, you should use setCursor() method.

A question from the "red book"

The code was:
open_window();
for(i=0;i<100000;i++){
clear_the_window();
draw_frame(i);
wait_until_a_24th_of_a_second_is_over();
}
The book says the problem with this code is: Suppose the drawing takes nearly a full 1/24 second. Items drawn first are visible for the full 1/24 second and present a solid image on the screen; items drawn toward the end are instantly cleared as the program starts on the next frame.
I don't quite understand what does it mean by "first" and "toward the end"? If the three functions within the loop are called sequentially, what is the problem? Unless it is not a sequential program?
Say this span of 10 stps covers 1/24th of a second:
Clear window
Item A begin drawing...
A is drawn completely and visible for almost 1/24th second
Item B begin drawing ...
...
... expensive drawing of B ...
B finished drawing -> wont be shown too long
Item C begin drawing...
...
finished drawing C -> will last very short as next iteration is
immanent
------- NEXT iteration -------
Clear window
and so on