Hi all ! :)

I need help with a little piece of code....
I (just) want my toolTip to have the "Balloon style" I use the following code to initialize my NOTIFYICONDATA structure :
According to the PSDK I wrote those lines..


mov note.cbSize,sizeof NOTIFYICONDATA
mov note.uVersion,3
invoke Shell_NotifyIcon,NIM_SETVERSION,addr note
push hWindow
pop note.hWnd
mov note.uID,IDI_TRAY
mov note.uFlags,NIF_ICON+NIF_TIP+NIF_INFOS+NIF_MESSAGE
mov note.uCallbackMessage,WM_SHELLNOTIFY
invoke lstrcpy,addr note.szTip,addr NoteTipString ; NoteTipString db "TeleBatch 1.0",0
invoke lstrcpy,addr note.szInfo,addr NoteTipString
invoke lstrcpy,addr note.szInfoTitle,addr NoteTipString
mov note.uTimeout,10000
mov note.dwInfoFlags,2h
invoke LoadImage,hInstance,IDI_TRAY,IMAGE_ICON,16,16,LR_COPYFROMRESOURCE
mov note.hIcon,eax
invoke Shell_NotifyIcon,NIM_ADD,addr note


It produce the result on the picture..
Any idea ????


:confused:
Posted on 2002-11-19 09:25:35 by PhoBos
Originally posted by PhoBos


mov note.uFlags,NIF_ICON+NIF_TIP+NIF_INFOS+NIF_MESSAGE



1) It should be NIF_INFO.
2) It only works on Win2000 and above.
Posted on 2002-11-19 09:44:26 by bazik
Hi bazik...

Well actually NIF_INFOS is a mistake in my post...sorry... Actually in my program, i've got NIF_INFO...
I developed it on Win2K & WinXP and it doesn't work :rolleyes:

Any other ideas ??? :grin:
Posted on 2002-11-19 12:11:28 by PhoBos
PhoBos
What size of the NOTIFYICONDATA.szTip?
Try 128 because
// shellapi.h PSDK-NOV-2002 

// size: 33'013 byte
// date: 19.11.2002
typedef struct _NOTIFYICONDATAA {
...
#if (_WIN32_IE < 0x0500)
CHAR szTip[64];
#else
CHAR szTip[128];
#endif
...
I successfully used
typedef struct _NOTIFYICONDATAA

{
DWORD cbSize;
HWND hWnd;
UINT uID;
UINT uFlags;
UINT uCallbackMessage;
HICON hIcon;
CHAR szTip[128];
DWORD dwState;
DWORD dwStateMask;
CHAR szInfo[256];
union
{
UINT uTimeout;
UINT uVersion;
} DUMMYUNIONNAME;
CHAR szInfoTitle[64];
DWORD dwInfoFlags;
// DWORD g[4];
} NOTIFYICONDATAA , *PNOTIFYICONDATAA;
Posted on 2003-06-05 01:43:30 by P2M