Print Page | Close Window

assert in wincore.cpp line 3117

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=1314
Printed Date: 07 May 2025 at 3:59pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: assert in wincore.cpp line 3117
Posted By: msamocha
Subject: assert in wincore.cpp line 3117
Date Posted: 24 October 2004 at 11:48am

 

Hi,

I wrote a little function to restore the command bars layout to their default like this:

LoadCommandBars(_T("DefaultCommandBars"));

It works fine and all toolbars get to their default position but if the users uses it to restore the toolbars position and then exits the program, I get an assertion in

wincore.cpp line 3117 :

BOOL PASCAL CWnd::WalkPreTranslateTree(HWND hWndStop, MSG* pMsg)

{

 ASSERT(hWndStop == NULL || ::IsWindow(hWndStop));

<...>

apparently hWndStop (the Main Window Handle) is no longer a window, and  ::IsWindow(hWndStop); fails... and asserts when the app is closed...

BTW if my reset function docks a floating toolbar A and then I re-float toolbar A manually everything is Ok. ie there is only a problem if my function docks a floating toolbar and the user keeps it docked and the closes the app...

 

Any ideas why this is so or how to prevent this?

 

<..BOOL PASCAL CWnd::WalkPreTranslateTree(HWND hWndStop, MSG* pMsg)

{

ASSERT(hWndStop == NULL || ::IsWindow(hWndStop));

ds




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