Print Page | Close Window

CXTPBrowseEdit asserts in your sample

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=20341
Printed Date: 16 November 2024 at 3:29pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPBrowseEdit asserts in your sample
Posted By: MichaelN
Subject: CXTPBrowseEdit asserts in your sample
Date Posted: 27 November 2012 at 4:49pm
Your sample project "BrowseEdit_vc90" asserts when using my own CFileDialog. In your CBrowseEditDlg.cpp there is a #if 0 block where you give code to implement a CFileDialog. I switched that to #if 1 to enable it, then re-built the sample app and ran it. When I click the [...] button to open the CFileDialog it works the first time. I close the file dialog and click [...] again and it asserts at line 377 of dlgfile.cpp. The assert is here:

hr = (

static_cast<IFileDialog*>(m_pIFileDialog))->SetFileTypes(nFilterCount, pFilter);

ENSURE(SUCCEEDED(hr));

The debugger shows nFilterCount = 2 and pFilter is the expected filter string.
 
Then I tried what you recommend, to make the CFileDialog a class variable and create it in the dialog constructor. I get exactly the same ASSERT.
Michael



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