Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.01.23;
Скачать: CL | DM;

Вниз

Помогите разобраться в Hints.   Найти похожие ветки 

 
andruxa   (2005-01-09 01:54) [0]

Зашел в тупик. Делаю иконку в таскбаре таким образом.

Var Nim:TNotifyIconData;
begin
With Nim do
Begin
cbSize:=SizeOf(Nim);
Wnd:=Form1.Handle;
uID:=1;
uFlags:=NIF_ICON or NIF_MESSAGE or NIF_TIP;
hicon:=Application.Icon.Handle;
uCallbackMessage:=wm_user+100;
StrLCopy(szTip, pchar(hint), Length(hint));
End;
Shell_NotifyIcon(Nim_Add,@Nim);

Проблема (1) в следующем. Необходимо поднять хинт над иконкой на несколько пикселей.
От незнания хинт создаваемый иконкой делаю пустым. Сделал чтобы хинт появлялся вот так, по сообщению WM_MOUSEMOVE от иконки
hintwnd:= THintWindow.create(self);
Потому что здесь можно задать его координаты, но здесь другая проблема (2), нужно чтобы хинт убирался когда мышь выходит за пределы иконки. Какое сообщение нужно ловить.

Помогите решить проблемы. Может есть путь еще проще?


 
Kerk ©   (2005-01-09 01:59) [1]

uCallbackMessage
Application-defined message identifier. The system uses this identifier to send notifications to the window identified in hWnd. These notifications are sent when a mouse event occurs in the bounding rectangle of the icon, or when the icon is selected or activated with the keyboard. The wParam parameter of the message contains the identifier of the taskbar icon in which the event occurred. The lParam parameter holds the mouse or keyboard message associated with the event. For example, when the pointer moves over a taskbar icon, lParam is set to WM_MOUSEMOVE. See the Taskbar guide chapter for further discussion.

попробуй WM_MOUSELEAVE ловить


 
andruxa   (2005-01-09 16:08) [2]

а WM_MOUSELEAVE иконка не передает. WM_MOUSEMOVE есть. не соображу как ловить.


 
andruxa   (2005-01-09 18:23) [3]

ну в самом окне понятно как. но а для иконки?.


 
grom   (2005-01-09 18:44) [4]

Может это поможет.
http://delphimaster.net/view/4-1105190027/



Страницы: 1 вся ветка

Текущий архив: 2005.01.23;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.052 c
3-1103479027
alextov
2004-12-19 20:57
2005.01.23
в Fast Report после экспорта в html не открываются отчеты


8-1097695708
TRyaSS
2004-10-13 23:28
2005.01.23
Где найти заголовки DirectX для D7?


14-1104137601
Homa_Programer
2004-12-27 11:53
2005.01.23
Копия экрана


4-1102065085
ZugZug
2004-12-03 12:11
2005.01.23
Определить, запущена ли другая прога


1-1104869641
MAlexander
2005-01-04 23:14
2005.01.23
Отсуствует стандартный компонент