ok It's not complicated but it'll be fiddly if you want to make it transparent to user
the reason you couldn't use the interface directly is simply because it doesn't match the exported functions
Code: Select all
CompilerIf #PB_Compiler_32Bit
XIncludeFile "SkinFramework.pbi"
CompilerElse
; XIncludeFile "SkinFramework64.pbi"
CompilerEndIf
Global Window_0
Global Button_0, Button_1, Text_0, String_0
Procedure InitWindow_0()
Window_0 = OpenWindow(#PB_Any, 0, 0, 600, 400, "", #PB_Window_SystemMenu)
Combo_0 = ComboBoxGadget(#PB_Any, 30, 40, 100, 25)
Checkbox_0 = CheckBoxGadget(#PB_Any, 180, 40, 100, 25, "")
Date_0 = DateGadget(#PB_Any, 390, 40, 100, 25, "")
ListIcon_0 = ListIconGadget(#PB_Any, 60, 120, 410, 100, "Column x", 100)
AddGadgetColumn(ListIcon_0, 1, "Column 2", 100)
AddGadgetColumn(ListIcon_0, 2, "Column z", 100)
For i =0 To 200
AddGadgetItem(ListIcon_0, -1, "Item " + Str(i))
Next
Tree_0 = TreeGadget(#PB_Any, 60, 240, 400, 130)
AddGadgetItem(Tree_0, -1, "ROOT")
AddGadgetItem(Tree_0, -1, "Something", 0, 1)
AddGadgetItem(Tree_0, -1, "More", 0, 1)
AddGadgetItem(Tree_0, -1, "Less", 0, 2)
AddGadgetItem(Tree_0, -1, "Dummy", 0, 2)
AddGadgetItem(Tree_0, -1, "Butter", 0, 2)
Container_0 = ContainerGadget(#PB_Any, 230, 80, 330, 25)
Checkbox_1 = CheckBoxGadget(#PB_Any, 170, 0, 100, 25, "")
CloseGadgetList()
EndProcedure
Debug GetCurrentDirectory()
SetCurrentDirectory(GetCurrentDirectory())
CompilerIf #PB_Compiler_32Bit =0
#CODEJOCK_LIB = "ToolkitProEval2210vc170x64UD.lib"
ImportC #CODEJOCK_LIB
XTPSkinManager() As "?XTPSkinManager@@YAPEAVCXTPSkinManager@@XZ"
LoadSkin.i(*this,lpszResourcePath.p-unicode, lpszIniFileName.p-unicode) As "?LoadSkin@CXTPSkinManager@@QEAAHPEB_W0@Z"
SetAutoApplyNewThreads(*this,bAutoApply.l) As "?SetAutoApplyNewThreads@CXTPSkinManager@@QEAAXH@Z"
SetAutoApplyNewWindows(*this,bAutoApply.l) As "?SetAutoApplyNewWindows@CXTPSkinManager@@QEAAXH@Z"
ApplyWindow(*this,hwnd.i) As "?ApplyWindow@CXTPSkinManager@@QEAAXPEAUHWND__@@H@Z"
EndImport
Define *CSkin
Define lib =0
Debug "x64"
*CSkin = XTPSkinManager()
SetAutoApplyNewThreads(*Cskin,1)
SetAutoApplyNewWindows(*cskin,1)
my_skin.s = GetCurrentDirectory() + "DXB.cjstyles"
Debug LoadSkin(*CSkin,my_skin, "")
CompilerElse
Define Skin.CSkinFramework = New_CSkinFramework()
Skin\SetAutoApplyNewThreads(1)
Skin\SetAutoApplyNewWindows(1)
my_skin.s = GetCurrentDirectory() + "DXB.cjstyles"
Skin\LoadSkin(my_skin, "")
CompilerEndIf
InitWindow_0()
Repeat
event = WaitWindowEvent()
Until event = #PB_Event_CloseWindow
If lib
CloseLibrary(lib)
EndIf