|
1 registered members (EW_bytes),
15,961
guests, and 6
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Tooltip
[Re: Cowabanga]
#250749
02/09/09 15:42
02/09/09 15:42
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
I was sure that it's impossible in Lite-C! That was before i read Quadraxas's post! And stay in the subject! Now you're annoying me! how could you be that sure? if you dont really know it's impossible, then dont say it is. this is not the first time you doing that.
3333333333
|
|
|
Re: Tooltip
[Re: MMike]
#250984
02/11/09 02:46
02/11/09 02:46
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Nup, that'll do me, looks to be possible. Gimme a bit to code and test and I'll post the changes here. One day at most.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Tooltip
[Re: EvilSOB]
#251046
02/11/09 12:02
02/11/09 12:02
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Sorry, I give up. I cant see any way to do it in 3DGS. I cant work out how to get to the newer NOTIFYICONDATA structure of windows, 3DGS seems to be using the older pre-2000 one, which doesnt support balloon tips.
Im not saying it CANT be done, but it doesnt look good, and I dont know how. Sorry.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Tooltip
[Re: EvilSOB]
#251067
02/11/09 13:55
02/11/09 13:55
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
just add them to the struct? i tried but can't get it to work. (i guess i am skipping some steps.) changed struct with this one:
#define NIF_INFO 0x00000010 //uFlags flag
#define NIIF_INFO 0x00000001 //baloon tooltip flag(info icon)
typedef struct _NOTIFYICONDATA{
DWORD cbSize;
HWND hWnd;
UINT uID;
UINT uFlags;
UINT uCallbackMessage;
HICON hIcon;
CHAR szTip[128];
//baloon vars
UINT uTimeout;
CHAR szInfo[256];
CHAR szInfoTitle[64];
DWORD dwInfoFlags;
HICON hBalloonIcon;
}NOTIFYICONDATA;
and this function:
BOOL ShowBalloonTip(CHAR* msg, CHAR* title,UINT uTimeout, DWORD dwInfoFlags)
{
_nid.uFlags = NIF_INFO;
_nid.uTimeout = uTimeout;
_nid.dwInfoFlags = NIIF_INFO;
strcpy(_nid.szInfo,msg);
strcpy(_nid.szInfoTitle,title);
return Shell_NotifyIcon(NIM_MODIFY, &_nid);
}
it doesn't crash but it doesnt do anything either. (btw, idk about headers but doesnt this related to OS's shell32.dll, i mean if functions are there, no reason they don't work?)
3333333333
|
|
|
Re: Tooltip
[Re: Quad]
#251072
02/11/09 14:08
02/11/09 14:08
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
The problem appears (to me) to be that to "enable" the extended structure, you need to have a "#define _WIN32_IE 0x0500" to tell the compiler to use the new structure instead of the old one.
I couldnt find any reference to _WIN32_IE in the include folder, but I tried it but no joy. I dont think the 3DGS compiler is implementing _WIN32_IE at all. And because we cant use _WIN32_IE, then Shell_notifyicon is only using the old structure and therefore cant access the balloontip control fields, even if we put the data in the right place.
That how it looks to me, anyway.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Tooltip
[Re: Quad]
#251088
02/11/09 15:30
02/11/09 15:30
|
Joined: Jul 2004
Posts: 1,710
MMike
OP
Serious User
|
OP
Serious User
Joined: Jul 2004
Posts: 1,710
|
in last case, a dll could be.. added but just for1 feature i dont know.
The "turning black window part to transparent" method is on the future list -Jcl, stated.. that would trick it, creating a window on top then, but the original API would be better.
JCL please some help here.
Last edited by MMike; 02/11/09 15:36.
|
|
|
Re: Tooltip
[Re: MMike]
#271432
06/13/09 04:15
06/13/09 04:15
|
Joined: Jul 2004
Posts: 1,710
MMike
OP
Serious User
|
OP
Serious User
Joined: Jul 2004
Posts: 1,710
|
EVILSOB: i found this to work, at least you cansee a weird ballon.. notice that cbsize i set to 540 ( vista) but its shout be cbsize=sizeof.. but that way it wont work this is the code, you cann from main..
#define NIF_INFO 0x00000010 //uFlags flag
#define NIIF_INFO 0x00000001 //baloon tooltip flag(info icon)
#define NIM_SETVERSION 0x00000004
#define NOTIFYICONDATA_V2_SIZE 488
#define NOTIFYICONDATA_V1_SIZE 88
bool ShowBalloonTip(CHAR* msg, CHAR* title,UINT uTimeout, DWORD dwInfoFlags)
{
// _nid.cbSize = sizeof(NOTIFYICONDATA);
//_nid.cbSize = sizeof(NOTIFYICONDATA_V2_SIZE);
//_nid.cbSize =(504);
_nid.cbSize =(488);
//_nid.cbSize = sizeof(_nid);
//_nid.cbSize = sizeof(NOTIFYICONDATA_V2_SIZE);
_nid.hWnd = hWnd;
_nid.uID = 999;
//nid.uFlags = NIF_ICON;
_nid.uFlags = NIF_ICON | NIF_TIP | NIF_INFO;
//_nid.uFlags = NIIF_INFO ;
//_nid.uTimeout = uTimeout;
_nid.uTimeout = 2000;
_nid.dwInfoFlags = NIIF_INFO;
strcpy(_nid.szInfo, msg);
strcpy(_nid.szInfoTitle, title);
strcpy(_nid.szTip, "ICONINC");
_nid.hIcon = (HICON)LoadImage(GetModuleHandle(NULL),"26.ico", IMAGE_ICON, 16, 16, LR_SHARED | LR_LOADFROMFILE | LR_VGACOLOR);
Shell_NotifyIcon(NIM_ADD, &_nid);
Shell_NotifyIcon(4, &_nid);
//return (
Shell_NotifyIcon(NIM_MODIFY, &_nid);
}
|
|
|
|