|
-
April 15th, 2004, 01:36 AM
#1
Use CFrameWnd as base of CChildFrame in MDI project
Hi,
I know I shall use CMDIFrameWnd as the base class of CChildFrame. But I'd like to have a test to use CFrameWnd as the base and it seems it works.
One reason is that with CMDIFrameWnd as base, it seems if one child frame is blocked by some function, the whole program will be blocked. But with CFrameWnd as base, it will not. I can operate other child even one of them is blocked.
However there are some problems:
1. All MDI related function will not work, such as MDIGetActive . Of course they will not. I will implement mine instead.
2. The main frame will be set inactive when a child frame is activated, the title bar is grayed, and when the main frame is activated, then child frame will deactivated.
I don't know why this problem happens. The child frame is made the child of the MDIClient window. I thought activate any child window will activate the parent window too ! Anyone knows how to solve this problem?
-
April 19th, 2004, 04:25 PM
#2
Of course it is possible.
You would have to override creation of the window and make it child. CFrameWnd class creates overlapped window, not a child window; therefore frame will float as top level, not contained in a client area of the main frame.
Other problems like activating or maximizing will also occur.
Above approach will not save your problem but rather introduce more problems.
If you process a lot of data this window will behave the same way, locking update of all windows in your app since it belongs to the same thread. Long data processing in a loop does not allow for idle GUI update.
You should use worker thread to process in the background, use local message in a loop that process data or use other means to allow idle update.
Search this forum for topics above.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|