Flype UserLibraries for PureBasic 4.0
Thanks!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net

-----
Solved!
Code: Select all
PureXLS_WriteString(id, "<AutoFilter x:Range="+Chr(34)+"R3C1:R3C11"+Chr(34)+" xmlns="+Chr(34)+"urn:schemas-microsoft-com:office:excel"+Chr(34)+">" )
PureXLS_WriteStringN(id, "</AutoFilter>")
PB 6.21 beta, PureVision User
SysTrayIcon library...
Hi Flype,
at first thank for the nice library SysTrayIcon.
In one of my project I need to use unicode
and the SysTrayIconBalloonEx2 procedure not works,
I'm analyzed the code and found out that you use
byte value on the NOTIFYICONDATA Structure
if you use character value
then the structure size not have a fix value on boot case ANSI/Unicode
and this constant are not ready anymore
#NOTIFYICONDATA_V1_SIZE = 88 ; 95+
#NOTIFYICONDATA_V2_SIZE = 488 ; 2000+
#NOTIFYICONDATA_V3_SIZE = 504 ; XP+
you need to use sizeof(NOTIFYICONDATA_95) for #NOTIFYICONDATA_V1_SIZE
and
sizeof(NOTIFYICONDATA_2k) for #NOTIFYICONDATA_V2_SIZE
and
sizeof(NOTIFYICONDATA_XP for #NOTIFYICONDATA_V3_SIZE
Best
jpd
here the changed file...
SysTrayIconRes.pb:
and the file SysTrayIconEx.pb:
at first thank for the nice library SysTrayIcon.
In one of my project I need to use unicode
and the SysTrayIconBalloonEx2 procedure not works,
I'm analyzed the code and found out that you use
byte value on the NOTIFYICONDATA Structure
if you use character value
then the structure size not have a fix value on boot case ANSI/Unicode
and this constant are not ready anymore
#NOTIFYICONDATA_V1_SIZE = 88 ; 95+
#NOTIFYICONDATA_V2_SIZE = 488 ; 2000+
#NOTIFYICONDATA_V3_SIZE = 504 ; XP+
you need to use sizeof(NOTIFYICONDATA_95) for #NOTIFYICONDATA_V1_SIZE
and
sizeof(NOTIFYICONDATA_2k) for #NOTIFYICONDATA_V2_SIZE
and
sizeof(NOTIFYICONDATA_XP for #NOTIFYICONDATA_V3_SIZE
Best
jpd
here the changed file...
SysTrayIconRes.pb:
Code: Select all
;-----------------------------------------------------------
;- Object: NotifyIcon UserLibrary
;- Version: 1.1, May 2006
;-
;- Requir.: PureBasic 4.0
;- TailBite 1.3 PR 1.0
;-
;- Author: flype - flype@altern.org
;-
;- Descr. Microsoft SHELL_NOTIFYICON
;- Functions for Systray Icon (shellapi.h)
;-----------------------------------------------------------
;-----------------------------------------------------------
; Constants
;-----------------------------------------------------------
Enumeration ; #WM
#WM_USER = $400
#WM_NOTIFYICON = $400 + $7258
EndEnumeration
Enumeration ; #NIF
#NIF_MESSAGE = $01 ; 95+
#NIF_ICON = $02 ; 95+
#NIF_TIP = $04 ; 95+
#NIF_STATE = $08 ; 95+
#NIF_INFO = $10 ; 2000+
#NIF_GUID = $20 ; XP+ Reserved
EndEnumeration
Enumeration ; #NIIF
#NIIF_NONE = $00 ; 2000+
#NIIF_INFO = $01 ; 2000+
#NIIF_WARNING = $02 ; 2000+
#NIIF_ERROR = $03 ; 2000+
#NIIF_USER = $04 ; XPSP2+
#NIIF_ICON_MASK = $0F ; XP+ Reserved
#NIIF_NOSOUND = $10 ; XP+ Reserved
EndEnumeration
Enumeration ; #NIM
#NIM_ADD = 0 ; 95+
#NIM_MODIFY = 1 ; 95+
#NIM_DELETE = 2 ; 95+
#NIM_SETFOCUS = 3 ; 2000+
#NIM_SETVERSION = 4 ; 2000+
EndEnumeration
Enumeration ; #NIN
#NINF_KEY = 1
#NIN_SELECT = $400
#NIN_KEYSELECT = $401
#NIN_BALLOONSHOW = $402 ; XP+
#NIN_BALLOONHIDE = $403 ; XP+
#NIN_BALLOONTIMEOUT = $404 ; XP+
#NIN_BALLOONUSERCLICK = $405 ; XP+
EndEnumeration
Enumeration ; #NIS
#NIS_HIDDEN = 1 ; 2000+
#NIS_SHAREDICON = 2 ; 2000+
EndEnumeration
#NOTIFYICON_VERSION = 3 ; 2000+
Structure NOTIFYICONDATA_95
cbSize.l
hwnd.l
uID.l
uFlags.l
uCallbackMessage.l
hIcon.l
szTip.c[64]
EndStructure
Structure NOTIFYICONDATA_2K Extends NOTIFYICONDATA_95
szTipEx.c[64]
dwState.l
dwStateMask.l
szInfo.c[256]
StructureUnion
uTimeout.l
uVersion.l
EndStructureUnion
szInfoTitle.c[64]
dwInfoFlags.l
EndStructure
Structure NOTIFYICONDATA_XP Extends NOTIFYICONDATA_2K
guid.GUID
EndStructure
Code: Select all
;------------------------------------------------------------------------------------------------
;- Object: SysTrayIconEx UserLibrary
;- Version: 1.0, May 2006
;- Author: flype - flype@altern.org
;- Requir.: PureBasic 4.0 / TailBite 1.3 PR 1.2
;------------------------------------------------------------------------------------------------
;EnableExplicit
IncludeFile "C:\code\UserLib_PB40_SysTrayIconEx\UserLib_PB40_SysTrayIconEx\Source\\SysTrayIconRes.pb"
;------------------------------------------------------------------------------------------------
; AddSysTrayIconEx(uID.l, hWindow.l, hIcon.l [, tip.s])
; RemoveSysTrayIconEx(uID.l, hWindow.l)
; SysTrayIconToolTipEx(uID.l, hWindow.l, tip.s)
; HideSysTrayIconEx(uID.l, hWindow.l, state.l)
; SetActiveSysTrayIconEx(uID.l, hWindow.l)
; SysTrayIconBalloonEx(uID.l, hWindow.l, title.s, message.s, timeOut.l [, flags.l])
;------------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------------
; Compatibility : Microsoft Windows 95+
;------------------------------------------------------------------------------------------------
ProcedureDLL.l AddSysTrayIconEx(uID.l, hWindow.l, hIcon.l)
Protected nid.NOTIFYICONDATA_95
nid\cbSize = SizeOf(NOTIFYICONDATA_95)
nid\uID = uID
nid\hwnd = hWindow
nid\hIcon = hIcon
nid\uFlags = #NIF_MESSAGE | #NIF_ICON
nid\uCallbackMessage = #WM_NOTIFYICON
ProcedureReturn Shell_NotifyIcon_(#NIM_ADD, @nid)
EndProcedure
ProcedureDLL.l AddSysTrayIconEx2(uID.l, hWindow.l, hIcon.l, tip.s)
Protected nid.NOTIFYICONDATA_2K
nid\uID = uID
nid\hwnd = hWindow
nid\hIcon = hIcon
nid\uFlags = #NIF_MESSAGE | #NIF_ICON | #NIF_TIP
nid\uCallbackMessage = #WM_NOTIFYICON
If OSVersion() >= #PB_OS_Windows_2000
PokeS(@nid\szTip, tip, 128)
nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
Else
PokeS(@nid\szTip, tip, 64)
nid\cbSize = SizeOf(NOTIFYICONDATA_95)
EndIf
ProcedureReturn Shell_NotifyIcon_(#NIM_ADD, @nid)
EndProcedure
ProcedureDLL.l RemoveSysTrayIconEx(uID.l, hWindow.l)
Protected nid.NOTIFYICONDATA_95
nid\cbSize = SizeOf(NOTIFYICONDATA_95)
nid\uID = uID
nid\hwnd = hWindow
ProcedureReturn Shell_NotifyIcon_(#NIM_DELETE, @nid)
EndProcedure
ProcedureDLL.l SysTrayIconToolTipEx(uID.l, hWindow.l, tip.s)
Protected nid.NOTIFYICONDATA_2K
nid\uID = uID
nid\hwnd = hWindow
nid\uFlags = #NIF_TIP
If OSVersion() >= #PB_OS_Windows_2000
PokeS(@nid\szTip, tip, 128)
nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
Else
PokeS(@nid\szTip, tip, 64)
nid\cbSize = SizeOf(NOTIFYICONDATA_95)
EndIf
ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid)
EndProcedure
;------------------------------------------------------------------------------------------------
; Compatibility : Microsoft Windows 2000+
;------------------------------------------------------------------------------------------------
ProcedureDLL.l HideSysTrayIconEx(uID.l, hWindow.l, state.l)
Protected nid.NOTIFYICONDATA_2K
If OSVersion() >= #PB_OS_Windows_2000
nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
nid\uID = uID
nid\hwnd = hWindow
nid\uFlags = #NIF_STATE
nid\dwStateMask = #NIS_HIDDEN
If state
nid\dwState = #NIS_HIDDEN
EndIf
ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid)
EndIf
EndProcedure
ProcedureDLL.l SetActiveSysTrayIconEx(uID.l, hWindow.l)
Protected nid.NOTIFYICONDATA_2K
If OSVersion() >= #PB_OS_Windows_2000
nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
nid\uID = uID
nid\hwnd = hWindow
ProcedureReturn Shell_NotifyIcon_(#NIM_SETFOCUS, @nid)
EndIf
EndProcedure
ProcedureDLL.l SysTrayIconBalloonEx(uID.l, hWindow.l, title.s, message.s, timeOut.l)
Protected nid.NOTIFYICONDATA_2K
If OSVersion() >= #PB_OS_Windows_XP
nid\cbSize = SizeOf(NOTIFYICONDATA_XP)
ElseIf OSVersion() >= #PB_OS_Windows_2000
nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
Else
ProcedureReturn #False
EndIf
nid\uVersion = #NOTIFYICON_VERSION
Shell_NotifyIcon_(#NIM_SETVERSION, @nid)
nid\uID = uID
nid\hwnd = hWindow
nid\dwInfoFlags = #NIIF_INFO
nid\uFlags = #NIF_INFO
nid\uTimeout = timeOut
PokeS(@nid\szInfo, message, 256)
PokeS(@nid\szInfoTitle, title, 64)
ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid)
EndProcedure
ProcedureDLL.l SysTrayIconBalloonEx2(uID.l, hWindow.l, title.s, message.s, timeOut.l, flags.l)
Protected nid.NOTIFYICONDATA_2K
If OSVersion() >= #PB_OS_Windows_XP
nid\cbSize = SizeOf(NOTIFYICONDATA_XP)
ElseIf OSVersion() >= #PB_OS_Windows_2000
nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
Else
ProcedureReturn #False
EndIf
nid\uVersion = #NOTIFYICON_VERSION
Shell_NotifyIcon_(#NIM_SETVERSION, @nid)
nid\uID = uID
nid\hwnd = hWindow
nid\dwInfoFlags = flags
nid\uFlags = #NIF_INFO
nid\uTimeout = timeOut
PokeS(@nid\szInfo, message, 256)
PokeS(@nid\szInfoTitle, title, 64)
ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid)
EndProcedure
PB 5.10 Windows 7 x64 SP1
Re: Flype UserLibraries for PureBasic 4.0
Hello Flype,
unfortunately PureStorage is down.
Is there a chance to download your libs anywhere else?
TIA & Greetings ... Kiffi
unfortunately PureStorage is down.

TIA & Greetings ... Kiffi
Hygge
Re: Flype UserLibraries for PureBasic 4.0
Please Update DL_Links
all is broken

all is broken
Re: Flype UserLibraries for PureBasic 4.0
I'm waiting for new links, too.Site had a blow out... trying to get everything back online... sorry all.
Thanks
-
- Enthusiast
- Posts: 157
- Joined: Tue Feb 13, 2007 6:16 pm
- Location: Romania
- Contact:
Re: Flype UserLibraries for PureBasic 4.0

Re: Flype UserLibraries for PureBasic 4.0
The libs are online on http://code.google.com/p/rwrappers/ , http://rwrappers.googlecode.com/svn/trunk
Use an SVN-client , eg. (http://tortoisesvn.net/), to download.
Use an SVN-client , eg. (http://tortoisesvn.net/), to download.
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Re: Flype UserLibraries for PureBasic 4.0
GitHub is nicer (for the downloader) - any chance of using that too?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Re: Flype UserLibraries for PureBasic 4.0
Regards to SysTrayIconEx...
To have it support x64 and some other adjustments. Is working with PB 5.22 LTS Beta
SysTrayIconRes.pbi
SysTrayIconEx.pb
To have it support x64 and some other adjustments. Is working with PB 5.22 LTS Beta
SysTrayIconRes.pbi
Code: Select all
;-----------------------------------------------------------
;- Object: NotifyIcon UserLibrary
;- Version: 1.1, May 2006
;-
;- Requir.: PureBasic 4.0
;- TailBite 1.3 PR 1.0
;-
;- Author: flype - flype@altern.org
;-
;- Descr. Microsoft SHELL_NOTIFYICON
;- Functions for Systray Icon (shellapi.h)
;-----------------------------------------------------------
;-----------------------------------------------------------
; Constants
;-----------------------------------------------------------
Enumeration ; #WM
#WM_USER = $400
#WM_NOTIFYICON = $400 + $7258
EndEnumeration
Enumeration ; #NIF
#NIF_MESSAGE = $01 ; 95+
#NIF_ICON = $02 ; 95+
#NIF_TIP = $04 ; 95+
#NIF_STATE = $08 ; 95+
#NIF_INFO = $10 ; 2000+
#NIF_GUID = $20 ; XP+ Reserved
EndEnumeration
Enumeration ; #NIIF
#NIIF_NONE = $00 ; 2000+
#NIIF_INFO = $01 ; 2000+
#NIIF_WARNING = $02 ; 2000+
#NIIF_ERROR = $03 ; 2000+
#NIIF_USER = $04 ; XPSP2+
#NIIF_ICON_MASK = $0F ; XP+ Reserved
#NIIF_NOSOUND = $10 ; XP+ Reserved
EndEnumeration
Enumeration ; #NIM
#NIM_ADD = 0 ; 95+
#NIM_MODIFY = 1 ; 95+
#NIM_DELETE = 2 ; 95+
#NIM_SETFOCUS = 3 ; 2000+
#NIM_SETVERSION = 4 ; 2000+
EndEnumeration
Enumeration ; #NIN
#NINF_KEY = 1
#NIN_SELECT = $400
#NIN_KEYSELECT = $401
#NIN_BALLOONSHOW = $402 ; XP+
#NIN_BALLOONHIDE = $403 ; XP+
#NIN_BALLOONTIMEOUT = $404 ; XP+
#NIN_BALLOONUSERCLICK = $405 ; XP+
EndEnumeration
Enumeration ; #NIS
#NIS_HIDDEN = 1 ; 2000+
#NIS_SHAREDICON = 2 ; 2000+
EndEnumeration
#NOTIFYICON_VERSION = 3 ; 2000+
Structure NOTIFYICONDATA_95 Align #PB_Structure_AlignC
cbSize.l
hwnd.i
uID.l
uFlags.l
uCallbackMessage.l
hIcon.i
szTip.c[128]
EndStructure
Structure NOTIFYICONDATA_2K Extends NOTIFYICONDATA_95
szTipEx.c[128]
dwState.l
dwStateMask.l
szInfo.c[256]
StructureUnion
uTimeout.l
uVersion.l
EndStructureUnion
szInfoTitle.c[128]
dwInfoFlags.l
EndStructure
Structure NOTIFYICONDATA_XP Extends NOTIFYICONDATA_2K
guid.GUID
EndStructure
Code: Select all
;------------------------------------------------------------------------------------------------
;- Object: SysTrayIconEx UserLibrary
;- Version: 1.0, May 2006
;- Author: flype - flype@altern.org
;- Requir.: PureBasic 4.0 / TailBite 1.3 PR 1.2
;------------------------------------------------------------------------------------------------
;EnableExplicit
IncludeFile "SysTrayIconRes.pbi"
;------------------------------------------------------------------------------------------------
; AddSysTrayIconEx(uID.l, hWindow.l, hIcon.l [, tip.s])
; RemoveSysTrayIconEx(uID.l, hWindow.l)
; SysTrayIconToolTipEx(uID.l, hWindow.l, tip.s)
; HideSysTrayIconEx(uID.l, hWindow.l, state.l)
; SetActiveSysTrayIconEx(uID.l, hWindow.l)
; SysTrayIconBalloonEx(uID.l, hWindow.l, title.s, message.s, timeOut.l [, flags.l])
;------------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------------
; Compatibility : Microsoft Windows 95+
;------------------------------------------------------------------------------------------------
ProcedureDLL.l AddSysTrayIconEx(uID.l, hWindow.l, hIcon.l)
Protected nid.NOTIFYICONDATA_95
nid\cbSize = SizeOf(NOTIFYICONDATA_95)
nid\uID = uID
nid\hwnd = hWindow
nid\hIcon = hIcon
nid\uFlags = #NIF_MESSAGE | #NIF_ICON
nid\uCallbackMessage = #WM_NOTIFYICON
ProcedureReturn Shell_NotifyIcon_(#NIM_ADD, @nid)
EndProcedure
ProcedureDLL.l AddSysTrayIconEx2(uID.l, hWindow.l, hIcon.l, tip.s)
Protected nid.NOTIFYICONDATA_2K
nid\uID = uID
nid\hwnd = hWindow
nid\hIcon = hIcon
nid\uFlags = #NIF_MESSAGE | #NIF_ICON | #NIF_TIP
nid\uCallbackMessage = #WM_NOTIFYICON
If OSVersion() >= #PB_OS_Windows_2000
PokeS(@nid\szTip, tip, 128)
nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
Else
PokeS(@nid\szTip, tip, 64)
nid\cbSize = SizeOf(NOTIFYICONDATA_95)
EndIf
ProcedureReturn Shell_NotifyIcon_(#NIM_ADD, @nid)
EndProcedure
ProcedureDLL.l RemoveSysTrayIconEx(uID.l, hWindow.l)
Protected nid.NOTIFYICONDATA_95
nid\cbSize = SizeOf(NOTIFYICONDATA_95)
nid\uID = uID
nid\hwnd = hWindow
ProcedureReturn Shell_NotifyIcon_(#NIM_DELETE, @nid)
EndProcedure
ProcedureDLL.l SysTrayIconToolTipEx(uID.l, hWindow.l, tip.s)
Protected nid.NOTIFYICONDATA_2K
nid\uID = uID
nid\hwnd = hWindow
nid\uFlags = #NIF_TIP
If OSVersion() >= #PB_OS_Windows_2000
PokeS(@nid\szTip, tip, 128)
nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
Else
PokeS(@nid\szTip, tip, 64)
nid\cbSize = SizeOf(NOTIFYICONDATA_95)
EndIf
ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid)
EndProcedure
;------------------------------------------------------------------------------------------------
; Compatibility : Microsoft Windows 2000+
;------------------------------------------------------------------------------------------------
ProcedureDLL.l HideSysTrayIconEx(uID.l, hWindow.l, state.l)
Protected nid.NOTIFYICONDATA_2K
If OSVersion() >= #PB_OS_Windows_2000
nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
nid\uID = uID
nid\hwnd = hWindow
nid\uFlags = #NIF_STATE
nid\dwStateMask = #NIS_HIDDEN
If state
nid\dwState = #NIS_HIDDEN
EndIf
ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid)
EndIf
EndProcedure
ProcedureDLL.l SetActiveSysTrayIconEx(uID.l, hWindow.l)
Protected nid.NOTIFYICONDATA_2K
If OSVersion() >= #PB_OS_Windows_2000
nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
nid\uID = uID
nid\hwnd = hWindow
ProcedureReturn Shell_NotifyIcon_(#NIM_SETFOCUS, @nid)
EndIf
EndProcedure
ProcedureDLL.l SysTrayIconBalloonEx(uID.l, hWindow.l, title.s, message.s, timeOut.l)
Protected nid.NOTIFYICONDATA_2K
If OSVersion() >= #PB_OS_Windows_XP
nid\cbSize = SizeOf(NOTIFYICONDATA_XP)
ElseIf OSVersion() >= #PB_OS_Windows_2000
nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
Else
ProcedureReturn #False
EndIf
nid\uVersion = #NOTIFYICON_VERSION
Shell_NotifyIcon_(#NIM_SETVERSION, @nid)
nid\uID = uID
nid\hwnd = hWindow
nid\dwInfoFlags = #NIIF_INFO
nid\uFlags = #NIF_INFO
nid\uTimeout = timeOut
PokeS(@nid\szInfo, message, 256)
PokeS(@nid\szInfoTitle, title, 64)
ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid)
EndProcedure
ProcedureDLL.l SysTrayIconBalloonEx2(uID.l, hWindow.l, title.s, message.s, timeOut.l, flags.l)
Protected nid.NOTIFYICONDATA_2K
If OSVersion() >= #PB_OS_Windows_XP
nid\cbSize = SizeOf(NOTIFYICONDATA_XP)
ElseIf OSVersion() >= #PB_OS_Windows_2000
nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
Else
ProcedureReturn #False
EndIf
nid\uVersion = #NOTIFYICON_VERSION
Shell_NotifyIcon_(#NIM_SETVERSION, @nid)
nid\uID = uID
nid\hwnd = hWindow
nid\dwInfoFlags = flags
nid\uFlags = #NIF_INFO
nid\uTimeout = timeOut
PokeS(@nid\szInfo, message, 256)
PokeS(@nid\szInfoTitle, title, 64)
ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid)
EndProcedure
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley