Print Page | Close Window

I met problem in CXTCaption::Create()

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=2689
Printed Date: 08 November 2025 at 4:03pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: I met problem in CXTCaption::Create()
Posted By: ksiva
Subject: I met problem in CXTCaption::Create()
Date Posted: 05 August 2005 at 2:43pm
Method CXTCaption::Create() has next code
 
if (HasCloseButton())
{
  // Create the caption's close button.
  if (!m_btnCaption.Create(NULL, WS_VISIBLE|WS_CHILD|BS_ICON|BS_OWNERDRAW|BS_CENTER|BS_VCENTE R,
    CRect(0,0,0,0), this, XT_IDC_BTN_CLOSE))
  {
    TRACE0( "Unable to create caption button.\n" );
    return -1;
  }
  // Create the image list used by frame buttons.
  m_ilButton.Create (XT_IDB_BTN_OUT, 16, 1, RGB(255,0,255));
  // and set the icon for the caption's close button
  m_btnCaption.SetIcon( CSize( 16, 15 ), m_ilButton.ExtractIcon( 2 ) );
}
 

I have problem in m_ilButton.ExtractIcon() because it doesn't check result from m_ilButton.Create() and if it is false then m_ilButton.ExtractIcon( ) fails.



Replies:
Posted By: Oleg
Date Posted: 05 August 2005 at 11:16pm

If Create fails, that mean you have no codejock resource in your exe/dll

I guess you build Application with Statically Toolkit? If so, add "XTToolkitPro.rc" in rc2 files.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: ksiva
Date Posted: 08 August 2005 at 9:55am
Yes. Thanks. You are genius.



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