I have inherited an SDI MFC application from a programmer who is no longer with the company. My instructions are to add a long list of features to this application (which is already rather feature rich). The app is running on Win2K Pro.
One of the features that is to be added requires a second instance of the application's central document. To accomplish this, the logical approach seemed to be to convert the application from SDI to MDI.
I went through the code and replaced all the references to SDI API's with MDI API's. The resulting app works very nicely - except for these peculiar behaviors:
FIRST Unexpected Behavior:
When the app is launched, it automatically creates two document instances and their associated MDI child windows and view instances. However, the client area of the view windows do not paint - at all.
The windows are displayed in the programmed locations, with the programmed dimensions. The title bars have the programmed text. The windows are neither minimized nor maximized. The client portions of the windows show whatever was on the screen previously.
The internal operations of the application and the document are behaving as expected, according to the debugger. All menu items are displayed and behave as expected, except that the client area is never painted.
SECOND Unexpected Behavior:
The three buttons on the right side of the title bar, which are supposed to be "Minimize", "Maximize", and "Close", instead are shown as "Restore Up", "Maximize", and "Close".
THIRD Unexpected Behavior:
Clicking the "Restore Up" button causes the window to begin operating exactly correctly. All contents are displayed correctly.
Can anyone explain these behaviors? How I caused them? How I can fix them?
Many thanks,
Dave
One of the features that is to be added requires a second instance of the application's central document. To accomplish this, the logical approach seemed to be to convert the application from SDI to MDI.
I went through the code and replaced all the references to SDI API's with MDI API's. The resulting app works very nicely - except for these peculiar behaviors:
FIRST Unexpected Behavior:
When the app is launched, it automatically creates two document instances and their associated MDI child windows and view instances. However, the client area of the view windows do not paint - at all.
The windows are displayed in the programmed locations, with the programmed dimensions. The title bars have the programmed text. The windows are neither minimized nor maximized. The client portions of the windows show whatever was on the screen previously.
The internal operations of the application and the document are behaving as expected, according to the debugger. All menu items are displayed and behave as expected, except that the client area is never painted.
SECOND Unexpected Behavior:
The three buttons on the right side of the title bar, which are supposed to be "Minimize", "Maximize", and "Close", instead are shown as "Restore Up", "Maximize", and "Close".
THIRD Unexpected Behavior:
Clicking the "Restore Up" button causes the window to begin operating exactly correctly. All contents are displayed correctly.
Can anyone explain these behaviors? How I caused them? How I can fix them?
Many thanks,
Dave