Hi!
I am a absolute beginner of PB and Firefly.
I wrote a DLL with a form called frmMidi inside. I want to add
a custom control PBSCtrl of Edwin Knoppert (BrowseForFolder- treeview).
I put the code in the start procedure like this
Function CreateForm Alias "CREATEFORM" (ByVal X As Long, ByVal Y As Long, ByVal formWidth As Long, ByVal formHeight As Long) Export As Long
Dim midiError As Long
Dim Result As Long
DIM a AS LONG
DIM R AS Rect
DIM T AS STRING
DIM sPath AS STRING
DIM sFile AS STRING
DIM pNMHDR AS NMHDR PTR
Static nSplit As Long
If InitPBSoftCtrls() = 0 Then
MsgBox "No PBSoft controls!"
Exit Function
End If
midiError = frmMidi_Show (HWND_FRMMIDI, %FALSE)
PostMessage HWND_FRMMIDI, %WM_SIZE, 0, 0
Control Add "" & $BROWSEFORFOLDER, HWND_FRMMIDI, %ID_BFF, "" _
, 0, 0, 0, 0 _
, %WS_CHILD OR %WS_VISIBLE OR %WS_TABSTOP _
OR %TVS_HASBUTTONS OR %TVS_LINESATROOT OR %TVS_HASLINES _
, %WS_EX_CLIENTEDGE
Control Send HWND_FRMMIDI, %ID_BFF, %BFF_EXPANDFIRSTITEM, 1, 0
Control Add "" & $FOLDERVIEW, HWND_FRMMIDI, %ID_FV, "", 0, 0, 0, 0, _
%WS_CHILD Or %WS_CLIPSIBLINGS Or %WS_CLIPCHILDREN Or %WS_TABSTOP Or %WS_VISIBLE _
OR %LVS_REPORT _
, %WS_EX_CLIENTEDGE
'// If you like, you can make use of a callback.
'// This can be handy if you would allow only certain filetypes etc.. (filter)
SendDlgItemMessage HWND_FRMMIDI, %ID_FV, %FLDV_CALLBACK, CodePtr( FolderView_CustomCallback ), 0
Function = 1
End Function
Unfortunately no control be created.
What goes wrong?
Thank you for your help!!!