Página 1 de 1

And some more ActiveX questions

Publicado: Mié Abr 02, 2008 12:57 am
por Nick Hilder
Hi Jose
In the C# example of the shortcut bar they create an array of int's, filling
the array with constants and then passing it to the LoadBitMap method. The
bitmap is 24 x ( length of number of images. )
int [] mailIconArray;
mailIconArray = new int[10];
mailIconArray[0] = ID.SHORTCUT_INBOX;
...........
wndShortcutBar.Icons.LoadBitmap(System.IO.Path.GetDirectoryN ame(Application.ExecutablePath)
+ "....Iconsmail_16x16.bmp", mailIconArray,
XTPImageState.xtpImageNormal);
Each icon then appears in the Shortcut bar with an image.
I have done this.
aItems := Array(6)
aItems[1] := :AddItem(0,"Events",)
aItems[2] := :AddItem(1,"Calendar")
aItems[3] := :AddItem(2,"Jobs",)
aItems[4] := :AddItem(3,"Companys",)
aItems[5] := :AddItem(4, "Contacts", )
aItems[6] := :AddItem(5, "Settings", )
::oBar:Icons:LoadBitmap("mail_16x16.bmp", aItems, xtpImageNormal)
it doesn't crash, but it doesn't display the images.
I then created a bitmap of just one of the images and used a numeric, like
this
::oBar:Icons:LoadBitmap("calendar_24x24.bmp", 1, xtpImageNormal)
This works, I get a Calendar Icon.
So my question is this
The argument in LoadBitmap expects a int, but obvoiusly in c# an array of
Int's is ok. How do I do the same thing in Xh? If I can't thats fine, I
just need to know.
Here's my little test app.
www.capsol.com.au/codejock.htm
Cheers
Nick