Print Page | Close Window

How do I destroy a CXTDock child window?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1203
Printed Date: 06 November 2025 at 2:06pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How do I destroy a CXTDock child window?
Posted By: Lucien
Subject: How do I destroy a CXTDock child window?
Date 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;

}




Replies:
Posted By: Lucien
Date Posted: 05 October 2004 at 2:51pm

Got it!

pHelpFrameWnd.DestroyWindow();



Posted By: Lucien
Date 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?



Posted By: Lucien
Date 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?




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net