Skin your window apps real easy with this AppFace test/demo!
Posted: Mon Sep 05, 2005 2:44 am
Code updated For 5.20+
Download AppFace from
http://www.goldtach.com/matinsoft/eng/appface/index.htm
Put the appface.dll along with the demo skin file sap_af.urf in the same dir as the code below:
The above code should demonstrate the appface "skinner" with the window demo from PureBasics help.
Download AppFace from
http://www.goldtach.com/matinsoft/eng/appface/index.htm
Put the appface.dll along with the demo skin file sap_af.urf in the same dir as the code below:
Code: Select all
Enumeration 4
#GTP_LOAD_FILE_ONLY
#GTP_LOAD_MEMORY_ONLY
#GTP_LOAD_RESOURCE_ONLY
EndEnumeration
Enumeration #WM_USER+$361
#WM_MDICLIENT_NOTIFY
#WM_DATETIME_LBUTTONUP
#WM_SETMENU_NOTIFY
EndEnumeration
Enumeration 1
#GTP_LOAD_FILE
#GTP_LOAD_MEMORY
#GTP_LOAD_RESOURCE
#GTP_LOAD_FILE_ONLY
#GTP_LOAD_MEMORY_ONLY
#GTP_LOAD_RESOURCE_ONLY
EndEnumeration
Enumeration
#WINDOW_TYPE_AUTOFILTER
#WINDOW_TYPE_SDK
#WINDOW_TYPE_VC
#WINDOW_TYPE_VB6
#WINDOW_TYPE_BCB
#WINDOW_TYPE_DELPHI
#WINDOW_TYPE_NET
EndEnumeration
Enumeration
#SKIN_CLASS_NOSKIN
#SKIN_CLASS_AUTOFILTER
#SKIN_CLASS_UNKNOWN = 6
#SKIN_CLASS_SCROLLWIN = 10
#SKIN_CLASS_FRAMEWIN = 101
#SKIN_CLASS_FRAMEDIALOG
#SKIN_CLASS_INSIDEDIALOG
#SKIN_CLASS_MDICLIENT
#SKIN_CLASS_COMBOBOX = 201
#SKIN_CLASS_DATETIME
#SKIN_CLASS_HEADER
#SKIN_CLASS_GROUPBOX
#SKIN_CLASS_IMAGEBUTTON
#SKIN_CLASS_MENU
#SKIN_CLASS_PROGRESS
#SKIN_CLASS_PUSHBUTTON
#SKIN_CLASS_SCROLLBAR
#SKIN_CLASS_SLIDER
#SKIN_CLASS_SPIN
#SKIN_CLASS_SPILTER
#SKIN_CLASS_STATUSBAR
#SKIN_CLASS_TAB
#SKIN_CLASS_TEXT
#SKIN_CLASS_TOOLBAR
#SKIN_CLASS_TOOLBAREX
#SKIN_CLASS_PANEL
#SKIN_CLASS_PANELEX
#SKIN_CLASS_PANELELIXIR
#SKIN_CLASS_HYPERLINK
#SKIN_CLASS_STATUSBAR_VB6
EndEnumeration
Enumeration 1
#BK_DIALOGPANEL
#BK_MDICLIENT
#BK_MDICHILD
#BK_SPLITTER
#BK_STATUSBAR
#BK_MENUBARBK
#BK_MENUBARHOVER
#BK_MENUBARDOWN
#BK_MENU_BK
#BK_MENU_HOVER
#BK_SCROLL_BK
#BK_SLIDER_CHANNEL_H
#BK_SLIDER_CHANNEL_V
#BK_PROGRESS_H_NORMAL
#BK_PROGRESS_V_NORMAL
#BK_PROGRESS_H_OVER
#BK_PROGRESS_V_OVER
#BK_IMAGE_ARROW = 1001
EndEnumeration
Enumeration 1
#ARROW_UP_NORMAL
#ARROW_UP_DOWN
#ARROW_DOWN_NORMAL
#ARROW_DOWN_DOWN
EndEnumeration
AppFace=OpenLibrary(#PB_Any,"appface.dll")
If AppFace=0
MessageRequester("Error","Cannot load library")
End
EndIf
result=CallFunction(AppFace,"SkinStart",@"sap_af.urf",#WINDOW_TYPE_AUTOFILTER,#Null,#GTP_LOAD_FILE,#Null,#Null)
If OpenWindow(0, 100, 200, 195, 260, "AppFace Window Test", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_Event_CloseWindow ; If the user has pressed on the close button
Quit = 1
EndIf
Until Quit = 1
EndIf
result=CallFunction(AppFace,"SkinRemove")
CloseLibrary(AppFace)
End ; All the opened windows are closed automatically by PureBasic