我填充IActiveDesktop.AddDesktopItem里的ShComponent结构为何老是返回E_Invalidarg,请各位大侠指点(100分)

  • 主题发起人 主题发起人 与树临风
  • 开始时间 开始时间

与树临风

Unregistered / Unconfirmed
GUEST, unregistred user!
代码如下:<br>var<br>&nbsp; &nbsp;ShCpt : TShComponent;<br>&nbsp; &nbsp;cmptpos : TCompPos;<br>begin<br>&nbsp; &nbsp;with cmptPos do<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; dwSize := sizeof(TCompPos);<br>&nbsp; &nbsp; &nbsp; iLeft := 200;<br>&nbsp; &nbsp; &nbsp; iTop := 50;<br>&nbsp; &nbsp; &nbsp; dwWidth :=100;<br>&nbsp; &nbsp; &nbsp; dwHeight := 100;<br>&nbsp; &nbsp; &nbsp; izIndex := 0;<br>&nbsp; &nbsp; &nbsp; fCanResize := True;<br>&nbsp; &nbsp; &nbsp; fCanResizeX := True;<br>&nbsp; &nbsp; &nbsp; fCanResizeY := True;<br>&nbsp; &nbsp; &nbsp; iPreferredLeftPercent := 60;<br>&nbsp; &nbsp; &nbsp; iPreferredTopPercent := 30;<br>&nbsp; &nbsp; end;<br>&nbsp; &nbsp;With shcpt do<br>&nbsp; &nbsp;begin<br>&nbsp; &nbsp; &nbsp;dwSize := SizeOf( TShComponent );<br>&nbsp; &nbsp; &nbsp;dwID := 0;<br>&nbsp; &nbsp; &nbsp;fChecked := True;<br>&nbsp; &nbsp; &nbsp;fDirty := false;<br>&nbsp; &nbsp; &nbsp;cpPos := cmptPos;<br>&nbsp; &nbsp; &nbsp;fNoScroll := True;<br>&nbsp; &nbsp; &nbsp;iComponentType := COMP_TYPE_WEBSITE;<br>&nbsp; &nbsp; &nbsp;strcopy(@wszSource,'http://www.Delphibbs.com');<br>&nbsp; &nbsp; &nbsp;strcopy(@wszFriendlyName,'http://www.Delphibbs.com');<br>&nbsp; &nbsp; &nbsp;strcopy(@wszSubscribedUrl,'http://www.Delphibbs.com');<br>&nbsp; &nbsp;end;<br>是不是最后这三行处错呢?谢谢各位!
 
后退
顶部