I'd like to use the TeeCommander in my Chart. Unfortunatelly I can't find an example of how to customize the toolbar using C++.
I found the method "SetControls" which takes a VARIANT as parameter but I don't know how to initialize this type so that the toolbar only displays let's say the edit button and the zoom button.
Thanks in advance.
Best regards,
Frank.
How to customize TeeCommander under C++?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Frank,
Could you please read this message? It contains some information using TeeChart Pro v7 ActiveX in VC++ and one example on how to use variables VARIANT.
More information can be found at the tutorial and examples mentioned in the thread I pointed above. Additionally, it may be helpful for you knowing of TeeChart's constant definitions at TeeChartDefines.h available at C:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\Visual C++.
If you are still having trouble achieving what you request please let us know and we will try to arrange an example for you.
Could you please read this message? It contains some information using TeeChart Pro v7 ActiveX in VC++ and one example on how to use variables VARIANT.
More information can be found at the tutorial and examples mentioned in the thread I pointed above. Additionally, it may be helpful for you knowing of TeeChart's constant definitions at TeeChartDefines.h available at C:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\Visual C++.
If you are still having trouble achieving what you request please let us know and we will try to arrange an example for you.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcís,
I've already seen the thread you mentioned and already found the TeeChartDefines.h but I still don't understand how to use the VARIANT in my case.
I'd like to know how a VB code like looks in C++.
Thanks for your help.
Best regards,
Frank.
I've already seen the thread you mentioned and already found the TeeChartDefines.h but I still don't understand how to use the VARIANT in my case.
I'd like to know how a VB code like
Code: Select all
Form Name : CommanderCustomForm
Private Sub Form_Load()
TeeCommander1.Chart = TChart1
TeeCommander1.Controls = Array(tcbRotate, _
tcbSeparator, _
tcbZoom, _
tcbSeparator, _
tcbEdit)
End Sub
Thanks for your help.
Best regards,
Frank.
Hi Frank,
you can use the following code in vcc :
you can use the following code in vcc :
Code: Select all
DWORD myElements[] = {1}; // Change value for more buttons
COleSafeArray myValues;
myValues.Create(VT_R8, 1, myElements);
// Initialize them with values...
// Display only the Rotate Button
long index=0;
double val=tcbRotate;
myValues.PutElement(&index, &val);
/* For some buttons
for(index=0; index<4; index++) {
double val = index;
myValues.PutElement(&index, &val);
};*/
m_commander.SetControls(myValues);
Pep Jorge
http://support.steema.com
http://support.steema.com