Print Page | Close Window

Setting DialogBar ChildHandle causes crash

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=21595
Printed Date: 22 November 2024 at 4:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Setting DialogBar ChildHandle causes crash
Posted By: johnbridges
Subject: Setting DialogBar ChildHandle causes crash
Date Posted: 19 April 2013 at 1:06pm
Xtreme Command Bars ActiveX 2012 (15.3.1)
Dev Environment VB6 Service Pack 6
Windows 7 both 32 and 64 bit versions

I have an application written in VB6 which utilizes the command bar object to create a ribbon bar menu system. All of this works without a problem but when I attempt to add a DialogBar object my application crashes with the following error:

Run-time error ‘-2147417848 (80010108)
Method ‘ChildHandle’ of object ‘IDialogBar’ failed 

This crash only occurs on 32bit Windows7

Here is a code snippet of where the crash occurs:

Set DialogBarActiveRecords = CommandBars.AddDialogBar("ActiveRecordsGrid", xtpBarRight)
DialogBarActiveRecords.ShowCaption = False
DialogBarActiveRecords.ShowGripper = False
 DialogBarActiveRecords.Closeable = False

DialogBarActiveRecords.ChildHandle = Me.mainPic.hWnd

mainPic  is a standard picture control which contains several other controls. If I remove all controls contained in mainPic the application still crashes.

Any help would be appreciated




Replies:
Posted By: SuperMario
Date Posted: 09 May 2013 at 11:57am
Are you sure Me.mainPic.hWnd is a valid handle?  Are you sure this PC has SP6 on it?  Please check the handle and ensure its valid.


Posted By: johnbridges
Date Posted: 09 May 2013 at 12:25pm
Yes me.mainPic.hWnd is a valid handle and the machine in question has SP6 installed. I added a bit more information don't know if you saw it in the issue I submitted. What I added was this:

Our application is MDI based, on the MDI form we align the picture control (mainPic) top, left. It is when the picture control is aligned this way it crashes when setting the dialogbar childhandle property. And this still only affects 32 bit win 7 not sure about win xp.

Thanks





Posted By: jpbro
Date Posted: 09 May 2013 at 1:25pm
I tried the code in VB6 SP6 on Win7 and XP (32-bit only), same version of the controls, and I'm not seeing the error.

Maybe you should try to re-register/re-install the OCX?


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6




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