![]() |
How do I destroy a CXTDock child window? |
Post Reply
|
| Author | |
Lucien
Newbie
Joined: 21 May 2004 Location: Canada Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Topic: How do I destroy a CXTDock child window?Posted: 24 September 2004 at 11:06am |
|
I have created a view window that displays an hmlt page. I took the example from GUI_VisualStudio7. Now after showing the html page for a while I want to display an another kind a view (regular dialog view) in the same window. I haft to find a way to destroy, detach or disable the SetChild(htmlView) function without destroy the parent window otherwise it will not work correctly. Can someone help me on this? In my previewWindow.cpp I have: --------------- int previewWindow::OnCreate(LPCREATESTRUCT lpCreateStruct){ if (CXTDockWindow::OnCreate(lpCreateStruct) == -1)return -1; // Create the html start page CPropertiesBarHelpFrame* pHelpFrameWnd; pHelpFrameWnd = NULL;pHelpFrameWnd = (CPropertiesBarHelpFrame*)CreateFrameDocView(RUNTIME_CLASS(C PropertiesBarHelpFrame), RUNTIME_CLASS( CPropertiesBarHelpView ) ); SetChild(pHelpFrameWnd); return 0;} |
|
![]() |
|
Lucien
Newbie
Joined: 21 May 2004 Location: Canada Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 October 2004 at 2:51pm |
|
Got it! pHelpFrameWnd.DestroyWindow(); |
|
![]() |
|
Lucien
Newbie
Joined: 21 May 2004 Location: Canada Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Posted: 06 October 2004 at 10:32am |
|
I said hourray! to fast. Now a window warning pop's up saying that "A required resource was unavailable" when the focus is set on that window. Does someone know what extra line of code I should use to resolve this issue? |
|
![]() |
|
Lucien
Newbie
Joined: 21 May 2004 Location: Canada Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 October 2004 at 1:10pm |
|
After a few hours of research, it seems to me that the pHelpFramWnd child window is still hooked to the parent even after a destroyWindow() of that child. When the focus is activated, the parent window searches for the html page that was destroyed and the bug "A required resource was unavailable" appears. What am I missing? |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |