as far as i found out, the *.bi Header files for freebasic are quite incomplete. I needed only a fraction of the missing ones, but here they are:
Code: Select all
'ListView Constants
#Define LVM_SETVIEW (&h1000 + 142)
#Define LVM_SORTITEMSEX (&h1000 + 81)
#Define LV_VIEW_ICON 0
#Define LV_VIEW_DETAILS 1
#Define LV_VIEW_SMALLICON 2
#Define LV_VIEW_LIST 3
#Define LV_VIEW_MAX 4
#Define LV_VIEW_TILE 4
'ComboBox Constants
#Define CB_SETCUEBANNER 5891
#Define CB_GETCUEBANNER 5892
'ListBox Macros
#Define ListBox_DeleteString(hLST,index) SendMessage(hLST,LB_DELETESTRING,index,NULL)
#Define ListBox_AddString(hLST,htext) SendMessage(hLST,LB_ADDSTRING,NULL,Cast(LPARAM,htext))
#Define ListBox_GetCurSel(hLST) SendMessage(hLST,LB_GETCURSEL,NULL,NULL)
#Define ListBox_GetSelCount(hLST) SendMessage(hLST,LB_GETSELCOUNT,NULL,NULL)
#Define ListBox_GetSelItems(hLST,nStrings,psel) SendMessage(hLST,LB_GETSELITEMS, _
nStrings, Cast(LPARAM,psel))
'Button Macros
#Define Button_GetCheck(hBTN) SendMessage(hBTN,BM_GETCHECK,NULL,NULL)
#Define Button_SetCheck(hBTN) SendMessage(hBTN,BM_SETCHECK,NULL,NULL)
'Combo Box Macros
#Define ComboBox_AddString(hCBO,htext) SendMessage(hCBO,CB_ADDSTRING,NULL,Cast(LPARAM,htext))
#Define ComboBox_GetCurSel(hCBO) SendMessage(hCBO,CB_GETCURSEL,NULL,NULL)
#Define ComboBox_SetCurSel(hCBO,index) SendMessage(hCBO,CB_SETCURSEL,index,NULL)
'ListView Macros
#Define ListView_SetView(hLSV,flag) SendMessage(hLSV,LVM_SETVIEW,flag,NULL)
#Define ListView_SortItemsEx(hLSV,pfnCompare,lparamSort) SendMessage(hLSV,LVM_SORTITEMSEX, _
lparamSort,Cast(LPARAM,pfnCompare))
Function ListView_SetItemText( ByVal hListview As HWND, ByVal i As Integer, _
ByVal iSubItem As Integer, ByVal pszText As LPCTSTR) As BOOL
Dim lvitem1 As LVITEM
With lvitem1
.mask = LVIF_TEXT
.iSubItem = iSubItem
.pszText = pszText
.iitem = i
End With
If SendMessage(hListview,LVM_SETITEMTEXT,i,Cast(lParam,@lvitem1)) = TRUE Then
Return TRUE
Else
Return FALSE
End IF
End Function
Function ListView_GetItemText( ByVal hListview As HWND, ByVal i As Integer, _
ByVal iSubItem As Integer, ByRef pszText As LPCTSTR, ByVal cchTextMax As Integer) As BOOL
Dim lvitem1 As LVITEM
Dim text As ZString * MAX_PATH+1
With lvitem1
.mask = LVIF_TEXT
.iSubItem = iSubItem
.pszText = psztext
.iitem = i
.cchTextMax = cchTextMax
End With
SendMessage(hListview,LVM_GETITEMTEXT,i,Cast(lParam,@lvitem1))
Return TRUE
End Function
'Subclassing declarations
Type SUBCLASSPROC As Function( ByVal As HWND, ByVal As UINT, ByVal As WPARAM, _
ByVal As LPARAM, ByVal As UINT_PTR, ByVal As DWORD_PTR) As LRESULT
Declare Function SetWindowSubclass Alias "SetWindowSubclass" ( ByVal As HWND, _
ByVal As SUBCLASSPROC, ByVal As UINT_PTR, ByVal As DWORD_PTR ) As BOOL
Declare Function RemoveWindowSubclass Alias "RemoveWindowSubclass" ( ByVal As HWND, _
ByVal As SUBCLASSPROC, ByVal As UINT_PTR ) As BOOL
Declare Function DefSubclassProc Alias "DefSubclassProc" ( ByVal As HWND, ByVal As UINT, _
ByVal As WPARAM, ByVal As LPARAM ) As LRESULT
Declare Function GetWindowSubclass Alias "GetWindowSubclass" ( ByVal As HWND, _
ByVal As SUBCLASSPROC, ByVal As UINT_PTR, ByVal As DWORD_PTR Ptr ) As BOOL
Code: Select all
#Define HH_DISPLAY_TOPIC 0000
#define HH_HELP_CONTEXT 0015
Dim As Any Ptr library = DylibLoad( "hhctrl.ocx" )
Dim Shared HtmlHelpA As Function (hwndCaller As HWND,pszFile As LPCSTR, _
uCommand As UINT,dwData As DWORD_PTR) As HWND
HtmlHelpA = DyLibSymbol( library, "HtmlHelpA" )