Print Page | Close Window

Problem with ON_XTP_CREATECONTROL

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=8393
Printed Date: 02 March 2025 at 4:54pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem with ON_XTP_CREATECONTROL
Posted By: joffreyb
Subject: Problem with ON_XTP_CREATECONTROL
Date Posted: 10 October 2007 at 3:42pm
Hello,
 
I just got my hands on XTP 11.2 and I find myself a bit puzzled with the fact that I can't seem to have the ON_XTP_CREATECONTROL working for me.
 
I saw a few reports of this but would like to know if I did something wrong.  I thought I did copy pretty much the code in the samples...
 
THE ISSUE:
The function OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl) is only called if I have menus. If the controls resides only on the ribbon, its not called.
 
Here's the project.  Uncomment the part for the menu and the function will be called !  I need to have custom controls on the Ribbon and not the menu.
 
https://forum.codejock.com/uploads/20071010_153925_CJ_TBTest.zip - uploads/20071010_153925_CJ_TBTest.zip
 
 
Many thanks in advance
 


-------------
Joff.
Xtreme Toolkit Pro v13.4.0
Win7-64, i7-920
VS8, VS9, VS10



Replies:
Posted By: Oleg
Date Posted: 11 October 2007 at 12:36am
Hello,
 
It called only if you don't add button manually - for example convert from menus or toolbar resources.
 
if you add button manually you just don't need it - create button "in-place" instead
 
pGroupFile->Add(xtpControlCustom, ID_BTN4);
call
 
CXTPControlCustom* pControlMonthCal = CXTPControlCustom::CreateControlCustom(&m_LC);
...
 
pGroupFile->Add(pControlMonthCal , ID_BTN4);


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



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