|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Saroj Acharya
|
Aug 3, 2005 - 7:25 PM
|
Hi Technical Support, My application is MDI and uses Customization and Tab window for the management of the views within the frame window. I want the window to be closed when the user presses certain function keys. I tried sending WM_CLOSE maeesge to the view from the CMainFRame.cpp function. When WM_CLOSE is sent to the view, it calles the function OnDestroy() of the view but it does not get removed completly from the TAN window. Please note that the window will be removed completly when I click the close (x) button of the window. AM I missing something here ? I am not being able to destroy the view from MDI Tab Frame window. Appreciate your help. Saroj
|
|
Technical Support
|
Aug 4, 2005 - 3:25 AM
|
Dear Saroj,
Both of the following invocations should close the window:
pWnd->DestroyWindow();
pWnd->SendMessage( WM_CLOSE ); In the latter case, a particular window can handle the WM_CLOSE windows message and cancel closing. Clicking the "X" button or "Close" item in the window’s system menu is equal to: pWnd->SendMessage( WM_SYSCOMMAND, SC_CLOSE ); The Prof-UIS menu bar and MDI tab windows also send this system command to the active MDI child frame window when their "X" button is pressed. In any case, we think to detect the source of the problem, we should debug your source code.
|
|
Saroj Acharya
|
Aug 5, 2005 - 9:16 AM
|
Sent you my project and waiting for your response. Thanks, Saroj
|
|
Technical Support
|
Aug 5, 2005 - 9:33 AM
|
Yes, we received your project but we start analyzing it, could you check the following. You should not send the WM_CLOSE message to the view. WM_CLOSE should be sent to the child frame window that contains the view.
|
|
Saroj Acharya
|
Aug 5, 2005 - 12:10 PM
|
It works now. Am I stupid or what ?? Should have known that !! Thanks for your help. Saroj
|
|