![]() |
Problem with ON_XTP_CREATECONTROL |
Post Reply ![]() |
Author | |
joffreyb ![]() Newbie ![]() ![]() Joined: 10 October 2007 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() 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.
Many thanks in advance
|
|
Joff.
Xtreme Toolkit Pro v13.4.0 Win7-64, i7-920 VS8, VS9, VS10 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
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 |