阅读:2271回复:3
使用什么接口和函数可以在程序中引用到style文件中的符号?
<P>使用什么接口和函数可以在程序中引用到style文件中的符号?</P>
<P>谢谢!</P> |
|
1楼#
发布于:2006-03-03 11:48
<P>看看帮助就晓得啦</P>
<P>esriDisplay IStyleGallery Example</P> <P>'Add a red to the colors in the users default style<BR>Dim pStyleGlry As IStyleGallery<BR>Set pStyleGlry = New StyleGallery<BR>Dim pStyleItem As IStyleGalleryItem<BR>Dim pRgbColor As IRgbColor<BR>Set pRgbColor = New RgbColor<BR>With pRgbColor<BR> .Red = 255<BR> .Green = 0<BR> .Blue = 0<BR>End With</P> <P>Set pStyleItem = New StyleGalleryItem<BR>pStyleItem.Name = "Red 1"<BR>pStyleItem.Category = "Default"<BR>pStyleItem.Item = pRgbColor<BR>pStyleGlry.AddItem pStyleItem</P> <P>'Find the first marker in the Civic.style<BR>Dim pStylePath As String<BR>'Add the Civic.style to the IStyleGalleryStorage<BR>Dim pStylStor As IStyleGalleryStorage<BR>Set pStylStor = pStyleGlry<BR>pStylePath = pStylStor.DefaultStylePath ; "Civic.style"<BR>pStylStor.AddFile pStylePath</P> <P>'Locate the first marker<BR>Dim pItems As IEnumStyleGalleryItem<BR>Set pItems = pStyleGlry.Items("Marker Symbols", pStylePath, "Default")<BR>pItems.Reset<BR>Dim pItem As IStyleGalleryItem<BR>Set pItem = pItems.Next<BR>MsgBox pItem.Name</P> |
|
|
2楼#
发布于:2006-03-03 14:28
<P>谢谢!</P>
|
|
3楼#
发布于:2006-03-25 08:57
<P>New StyleGallery<BR> 这个类不能在Engine中使用</P>
<P>只有安装了桌面软件才能使用</P> <P>有没有能在Engine中打开的代码</P> |
|