Crash on creating new CXTPPropertyGrid() |
Post Reply |
Author | |
mojonez
Groupie Joined: 16 September 2008 Status: Offline Points: 17 |
Post Options
Thanks(0)
Posted: 16 September 2008 at 2:53pm |
Hi there,
I'm upgrading code from v. 11.2.1 to 12.0.1, and I now get a crash error when creating a new property grid (same exact code):
Crash ocurrs in CXTPPropertyGrid constructor at: VERIFY(m_pPaintManager->GetItemMetrics()->m_fontNormal.CreateFontIndirect(&lfIcon));
Which invokes an attach on the font, whose GDI object is non-null: BOOL CGdiObject::Attach(HGDIOBJ hObject) { ASSERT(m_hObject == NULL); // only attach once, detach on destroy Again, same exact code as v 11.2.1, which works fine.Is anyone else successfully creating the grid dynamically?
Thanks!
Morgan
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
What platform defines you have in stdafx.h ? Are you sure youdin't change it to Vista ?
try change to
#if _MSC_VER > 1200 // Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms. #ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later. #define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. #endif #ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. #endif #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. #endif #ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
#define _WIN32_IE 0x0500 // Change this to the appropriate value to target IE 5.0 or later. #endif #endif
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
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 |