Seite 1 von 1

UserNotification ...

Verfasst: 17.02.2006 18:51
von bingo

Code: Alles auswählen

Procedure.l Ansi2Uni(ansi.s) 
SHStrDup_(@ansi,@memziel)
ProcedureReturn memziel
EndProcedure

#NIF_ICON = 2

CoInitialize_(0) 

If CoCreateInstance_(?CLSID_UserNotification,0,1,?IID_IUserNotification,@object.IUserNotification) = 0

;object\SetBalloonRetry(5000,0,0); 
object\SetIconInfo(LoadIcon_(0, #IDI_QUESTION),ansi2uni("tooltip")); 
object\SetBalloonInfo(ansi2uni("test"),ansi2uni("bluna 1 2 3 4 5 6 7 8 9 0"),#NIF_ICON); 
object\Show(0,0)
object\release()
EndIf

CoUninitialize_() 

DataSection 
CLSID_UserNotification: 
Data.l $0010890e
Data.w $8789,$413c
Data.b $ad,$bc,$48,$f5,$b5,$11,$b3,$af 

IID_IUserNotification: 
Data.l $ba9711ba
Data.w $5893,$4787
Data.b $a7,$e1,$41,$27,$71,$51,$55,$0b 
EndDataSection 
http://msdn.microsoft.com/library/defau ... n/Show.asp

offen ist hier noch , wie man wirklich die anzeigezeit setzen kann ??? 8)

Verfasst: 17.02.2006 20:45
von DROOPY
Thanks. Usefull code

Verfasst: 06.03.2006 19:42
von hardfalcon
Ich hab ein Haar ein in der Suppe gefunden :mrgreen:

Anstelle von #NIF_ERROR solltest du vielleicht besser die Konstante verwenden, die eigentlich dafür gdacht ist: #NIIF_ERROR :wink:

Hier die komplete Liste aller verwendbaren Icons/Konstanten:
MSDN hat geschrieben: [in] DWORD that contains the value of a state flag.
NIIF_ERROR
An error icon.
NIIF_INFO
An information icon.
NIIF_NONE
No icon.
NIIF_USER
Windows XP Service Pack 2 (SP2) and later. Use the icon identified in hIcon as the notification balloon's title icon.
NIIF_WARNING
A warning icon.
NIIF_ICON_MASK
Version 6.0. Reserved.
NIIF_NOSOUND
Version 6.0. Do not play the associated sound. Applies only to balloon ToolTips.

Verfasst: 08.03.2006 21:27
von flype