I just purchased CodeJock
Xtreme CommandBarPro 10.30.
Xtreme Controls 10.30
I want to use them in my program. I added a
CXTPControlPopupColor
button to my toolbar that has a child PopUp Color selector. Hence in my OnCreateControl(*)
I put the codes below which are similar to the TearOff Popup bar example. I have no problem to build and run the program. But I found, when the TearOff Color Popup bar shows, The captions "Automatic" and "More Color" do not show. I select either the constant XTP_IDS_AUTOMATIC or XTP_IDS_MORE_COLORS in my MFC 6.0 program, right click to see the definition of the constant. It leads me to my program's "Resource.h" page where the two constants are not defined there. But if I want to see the definition of XTP_IDS_AUTOMATIC or XTP_IDS_MORE_COLORS in the TearOff toolbar example, it leads me to "....\CommandBars\Resource.h" and the two constants are defined there.
So quite obviously "....\CommandBars\Resource.h" has not been included in my program. This should be program configuration problem. I have included both headers in my "stdafx.h"
#include <XTCommandBarsPro.h>
#include <XTControls.h>
What else I should do? Any suggestions? I am using MFC as a static library.
......
if (lpCreateControl->nID == ID_INKCOLOR && pToolBar->GetBarID() == IDR_TOOLBAR_JW) { CXTPControlPopupColor* pPopupColor = new CXTPControlPopupColor();
pColorBar = CXTPPopupToolBar::CreatePopupToolBar(GetCommandBars()); pPopupColor->SetCommandBar(pColorBar);
CXTPControl * pXTPCtrl = pColorBar->GetControls()->Add(new CXTPControlButtonColor(), XTP_IDS_AUTOMATIC); pColorBar->GetControls()->Add(new CXTPControlColorSelector(), ID_SELECTOR_TEXT);
pXTPCtrl = pColorBar->GetControls()->Add(new CXTPControlButtonColor(), XTP_IDS_MORE_COLORS); pColorBar->SetTearOffPopup(_T("Ink Color"), 1005, 0); pColorBar->EnableCustomization(FALSE);
pColorBar->InternalRelease(); lpCreateControl->pControl = pPopupColor; return TRUE; }
......
------------- Sharing makes life better
|