Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Problem with ON_XTP_CREATECONTROL
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with ON_XTP_CREATECONTROL

 Post Reply Post Reply
Author
Message
joffreyb View Drop Down
Newbie
Newbie
Avatar

Joined: 10 October 2007
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote joffreyb Quote  Post ReplyReply Direct Link To This Post Topic: Problem with ON_XTP_CREATECONTROL
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.