AxSupport Package rev 1

User contributed sources that have become inactive, deprecated, or generally unusable. But ... we don't really want to throw them away either.
Post Reply
Loe
Posts: 323
Joined: Apr 30, 2006 14:49

AxSupport Package rev 1

Post by Loe »

Someone asked me to release update of AxSupport,
so here we are :-)

What New:
- vTable Call improved, no vartype check, slightly faster in some case
- bstr and variant helper
- Documetation (specification, command list, tutorial)
- various samples

Do you want this ActiveX control?
Image

if you have Nero burning rom 6, then you have it.

Ive uploaded the package in
http://www.freebasic.net/arch/category.php?id=2

so keep watching ^_^
Last edited by Loe on Jan 07, 2009 4:47, edited 1 time in total.
crysstaafur
Posts: 40
Joined: Aug 06, 2007 8:06
Location: Altus, Ok, USA
Contact:

Post by crysstaafur »

Thank you! ^_^
This is going to help a ton!
Wonderful timing, I've just stablized the alpha build of DBT 1.5
I'll post a link once it's ready for beta..
l8trz
Zippy
Posts: 1295
Joined: Feb 10, 2006 18:05

Post by Zippy »

Instructions, please, how to successfully login to the archive and dl something?
phishguy
Posts: 1201
Joined: May 05, 2006 16:12
Location: West Richland, Wa

Post by phishguy »

@Zippy
As far as I know, you use the same login info that you use for the Freebasic forum and it should allow you to download. At least it did for me.
D.J.Peters
Posts: 8642
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

Zippy wrote:Instructions, please, how to successfully login to the archive and dl something?
archive login needs case sensitive login name and the password of course

Joshy
Zippy
Posts: 1295
Joined: Feb 10, 2006 18:05

Post by Zippy »

phishguy wrote:@Zippy
As far as I know, you use the same login info that you use for the Freebasic forum and it should allow you to download. At least it did for me.
Thanks for the response. It was a security issue. Probably cookies (like it says in tiny print on the dl page..).

This should be an interesting alternative to dishelper.

@Joshy

thanks for the response.
Cookies.
I had to lighten up on freebasic.net.
Loe
Posts: 323
Joined: Apr 30, 2006 14:49

Post by Loe »

@crysstaafur
Wonderful timing, I've just stablized the alpha build of DBT 1.5
he he, you know who is someone asked me ^_^

I ve email you twice, is my email defined as spam in ur inbox?
Cherry
Posts: 358
Joined: Oct 23, 2007 12:06
Location: Austria
Contact:

Post by Cherry »

Sorry, but what is this for? I don't understand this.
Loe
Posts: 323
Joined: Apr 30, 2006 14:49

Post by Loe »

Hi Cherry,
it likes disphelper with different approach for COM programming.
but AxSupport has more feature:
- it can be use for ActiveX control programming
- it support vTable call
- it can sink event generated by ActiveX/COM

AxSupport use UDT to define an interface.
and the syntax will be
AxCall InterfaceName.member, @variant1, @variant2,... for invoke sub/put
VariantRet=AxGet(InterfaceName.member, @variant1,...) for invoke function/get
vtCall InterfaceName.member, arg1,arg2,@retValue for vTable sub/fucntion

Please see the documentation in AxSupport Package to get the detail.
Cherry
Posts: 358
Joined: Oct 23, 2007 12:06
Location: Austria
Contact:

Post by Cherry »

ah, okay.

But I am not able to find any documentation???

In addition, no one of the EXE files works.

AX.EXE does nothing
TUTORIAL1FORM.EXE opens a large window with no content in it and doesn't react (I had to kill it though the task manager)
TLB.EXE shows an error ("Couldnt create an instance of tlbinf32.dll")
Loe
Posts: 323
Joined: Apr 30, 2006 14:49

Post by Loe »

Hi Cherry,
Sorry if the package not convenient to you,
the documentation is AxSupport.pdf, you need Acrobat reader to open it.
To run compiled samples you need required library/ActiveX control, that is not included in the package:
-need atl71.dll in windows/system for activex control sample
-AxTLB.exe need tlbinf32.dll in windows/system
-Ax01/02 need mscal.ocx properly installed
-ADOX need msadodc.ocx, msdtgrid.ocx, ADO properly installed and nwind.mdb in ADOX folder
-nero6 need nero burning rom 6 softwares installed
-axie need MS Internet Explorer installed
-AxExcel.exe you need Ms Excel installed

I cant distribute it caused by copyright and license issue, sorry
you can take a look http://www.fbedit.freebasic.net/viewtopic.php?f=6&t=196 where you can find a link to get those necessary libs.
and off course you can googling them ^_^
Loe
Posts: 323
Joined: Apr 30, 2006 14:49

Post by Loe »

Sorry, didnt know I missed lv.bi in the package.
for those who want to play with AxTLB you need this as ListView wrapper.
lv.bi

Code: Select all

#include once "strwrap.bi"
#include once "win/commctrl.bi"


'CONST LVN_GETDISPINFO     = LVN_FIRST - 50
'const LVN_COLUMNCLICK     = LVN_FIRST - 8
const LVM_SORTITEMSEX     = LVM_FIRST + 81

TYPE LV_ITEM
    mask       AS uinteger
    iItem      AS LONG
    iSubItem   AS LONG
    STATE      AS uinteger
    stateMask  AS uinteger
    pszText    AS zstring PTR
    cchTextMax AS LONG
    iImage     AS LONG
    lParam     AS LONG
    iIndent    AS LONG
    iGroupId   AS LONG
    cColumns   AS uinteger        ' tile view columns
    puColumns  AS uinteger PTR
END TYPE

TYPE LV_DISPINFO
    hdr  AS NMHDR
    item AS LV_ITEM
END TYPE

sub lvInit
	dim iccex AS InitCommonControlsEx
	iccex.dwSize = SIZEOF(iccex)
	iccex.dwICC  = ICC_LISTVIEW_CLASSES
	InitCommonControlsEx(@iccex)
end sub

SUB LVSetHeader(BYVAL lvg AS uinteger,BYVAL strItem AS STRING)
  dim szItem        AS zstring * MAX_PATH   ' working variable
  dim tlvc          AS LVCOLUMN             ' specifies or receives the attributes of a listview column
  dim tlvi          AS LVITEM               ' specifies or receives the attributes of a listview item
  dim uItem         AS LONG
  dim loItem        AS LONG
  dim iItem         AS LONG
  dim nItem         AS LONG
  dim ccount        AS LONG

  nItem=str_numparse(stritem,"|")

  FOR iItem=1 TO nItem
      szItem = str_parse(stritem,"|",iItem)
      tlvc.mask     = LVCF_FMT OR LVCF_WIDTH OR LVCF_TEXT OR LVCF_SUBITEM
      tlvc.fmt      = LVCFMT_LEFT
      tlvc.cx       = 96
      tlvc.pszText  = VARPTR(szItem)
      tlvc.iSubItem = iitem-1
      SendMessage lvg, LVM_SETCOLUMN, iitem-1, BYVAL VARPTR(tlvc)
  NEXT
END Sub

SUB LVSetColWidth(BYVAL lvg AS uinteger,BYVAL iitem  AS Integer,ByVal w As Integer)
  dim tlvc          AS LVCOLUMN             ' specifies or receives the attributes of a listview column

	tlvc.mask     = LVCF_WIDTH OR LVCF_SUBITEM
	tlvc.cx       = w
	tlvc.iSubItem = iitem
	SendMessage lvg, LVM_SETCOLUMN, iitem, BYVAL VARPTR(tlvc)

END Sub

Sub lvsetcolfmt(BYVAL lvg AS uinteger,BYVAL col AS Long,ByVal fmt As long)
  	dim tlvc          AS LVCOLUMN             ' specifies or receives the attributes of a listview column
	tlvc.mask     = LVCF_FMT OR LVCF_SUBITEM
	tlvc.fmt      = fmt
	tlvc.iSubItem = col
	SendMessage lvg, LVM_SETCOLUMN, col, BYVAL VARPTR(tlvc)
End Sub

SUB LVSetMaxCols(BYVAL rr AS uinteger,BYVAL cols AS LONG)
  dim tlvc  AS LVCOLUMN
  dim col   AS LONG

  FOR col=0 TO cols-1:SendMessage rr, LVM_INSERTCOLUMN, 0, BYVAL VARPTR(tlvc):NEXT
END SUB

SUB LVSetMaxRows(BYVAL rr as uinteger,BYVAL rows AS LONG)
  dim irow AS LONG
  dim tlvi AS LVITEM
  dim glvnumrows as long
  glvnumrows=sendmessage(rr,LVM_GETITEMCOUNT,0,0)
  IF glvnumrows<=rows THEN
    FOR irow=glvnumrows TO rows-1
      tlvi.iItem = irow
      SendMessage rr, LVM_INSERTITEM, irow, BYVAL VARPTR(tlvi)
    NEXT
  ELSE
    FOR irow=rows TO glvnumrows-1
      SendMessage rr,LVM_DELETEITEM,0,rows
    NEXT
  END IF  
END SUB

SUB LVSetValue(BYVAL rr AS uinteger,BYVAL item AS LONG,BYVAL column AS LONG,BYVAL strs AS STRING)
    dim ms_lvi AS LVITEM
    dim psztext as zstring*max_path
    psztext=strs
    ms_lvi.iitem = item
    ms_lvi.iSubItem = column
    ms_lvi.pszText = @pszText
    ms_lvi.lparam = item    
    SendMessage rr, LVM_SETITEMTEXT, item, VARPTR(ms_lvi)
END SUB 

FUNCTION LVGetValue(BYVAL rr AS uinteger, BYVAL item AS LONG, BYVAL column AS LONG)AS STRING
    dim ms_lvi AS LV_ITEM
    dim psztext as zstring*max_path
    ms_lvi.iSubItem = Column
    ms_lvi.cchTextMax = max_path
    ms_lvi.pszText = @pszText
    SendMessage rr, LVM_GETITEMTEXT, item, @ms_lvi
    FUNCTION = psztext
END FUNCTION     

function lvFindItem(hList AS LONG, Value AS STRING)as integer
    DIM lvf AS LVFINDINFO
    DIM i AS integer
    DIM szStr AS zstring * 300
    DIM iStatus AS INTEGER

    lvf.flags = LVFI_STRING OR LVFI_Partial
    szStr = ucase$(Value)

    lvf.psz = @szStr
    i = SendMessage(hList,LVM_FINDITEM, -1, @lvf)
    IF i >= 0 THEN
        istatus = ListView_EnsureVisible(hList, i, true)
    END IF
    function=i
END function

SUB LVSetItem(hList AS LONG, byval item as long,Rec AS STRING )
    DIM z AS INTEGER
    DIM iStatus AS INTEGER
    DIM szStr AS zstring* 300
    DIM lvi AS LV_ITEM
    dim x AS LONG

    'this will be the next record

    lvi.iItem = item
    lvi.mask = LVIF_TEXT
    lvi.stateMask = LVIS_FOCUSED '%LVIS_SELECTED
    lvi.pszText = @szStr

    FOR z = 0 TO str_numparse(Rec,"|")-1
        szStr = str_parse(Rec,"|",z+1)
        lvi.iSubItem = z

        lvi.lParam = lvi.iItem
        IF z = 0 THEN
            lvi.mask = LVIF_TEXT OR LVIF_PARAM OR LVIF_STATE
            iStatus = ListView_setItem (hList, @lvi)
        ELSE
            lvi.mask = LVIF_TEXT
            iStatus = ListView_SetItem (hList, @lvi)
        END IF
    NEXT
END SUB


SUB LVAddItem(hList AS LONG, Rec AS STRING )
    DIM z AS INTEGER
    DIM iStatus AS INTEGER
    DIM szStr AS zstring* 300
    DIM lvi AS LV_ITEM
    dim x AS LONG

    'this will be the next record

    lvi.iItem = sendmessage(hlist,lvm_GetItemCount,0,0)'ListView_GetItemCount(hList) '+ 1
    
    lvi.mask = LVIF_TEXT
    lvi.stateMask = LVIS_FOCUSED '%LVIS_SELECTED
    lvi.pszText = @szStr

    FOR z = 0 TO str_numparse(Rec,"|")-1
        szStr = str_parse(Rec,"|",z+1)
        lvi.iSubItem = z

        lvi.lParam = lvi.iItem
        IF z = 0 THEN
            lvi.mask = LVIF_TEXT OR LVIF_PARAM OR LVIF_STATE
            iStatus = ListView_InsertItem (hList, @lvi)
        ELSE
            lvi.mask = LVIF_TEXT
            iStatus = ListView_SetItem (hList, @lvi)
        END IF
    NEXT
END SUB
Loe
Posts: 323
Joined: Apr 30, 2006 14:49

Post by Loe »

update axsupport component
- axctrl.dll, fbedit custom control
- axobj.bi, change atl71.dll to atl.dll (default for IE5 comes with win98 and later)
- for fbedit user, in dlgeditor, AX control will show its ActiveX control appearance, cool ^_^


http://www.fbedit.freebasic.net/viewtop ... 1296#p1296
Post Reply