Top.Mail.Ru
Мастера DELPHI, Delphi programming community Титульная страница Поиск, карта сайта Написать письмо 
| Новости | Поиск | FAQ | Статьи | Книги | Новости VCL |
| Форумы ЧАТ | Орешник | KOL и MCK |
Форумы -» Основная («Начинающим»)/ Базы / WinAPI / Компоненты / Сети / Media / Игры / Corba и COM / KOL / FreePascal / .Net / Прочее / RSDN.ORG

« предыдущая ветвь | форум | следующая ветвь »

Message. Помогите разобраться. [D6, Win2k]


Alec ©   (2003-08-14 20:05:00) 

Хотелось бы узнать.
Приложение получает Message "от таймера". Кто его передаёт?
Ведь у таймера нет своего Handle (или всё-таки есть)- это же не окно.
И ещё.
При выводе Hint (и при пропадании) сообщение приходит от DeskTop (HWND = 0). Т.е. Hint рисуется напрямую на экран?


WhiteShadow   (2003-08-14 23:10:00) [1]

хотя зачем мучаться? :) это есть и на http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/tooltip/reflist.asp


Alec   (2003-08-14 22:55:00) [2]

Не откажусь. Спасибо.


WhiteShadow   (2003-08-14 22:47:00) [3]

если хотите могу этот раздел SDK выслать на мыло :)


Alec   (2003-08-14 22:18:00) [4]

С таймером более-менее разобрался. Спасибо, что наставили на путь истинный (именно без кавычек). Очень помог SetTimer.
Я так понял, что таймер "прилеплен" к некоторому окну (или наоборот):- его-то HWND и берётся.
С хинтом ещё помучаюсь. Вот только...
.../найти в том же SDK/
SDK найду.


WhiteShadow   (2003-08-14 20:40:00) [5]

Забыл на счет хинта сказать %)

Хинт - это окно кдасса Tooltips_Class32 которое располагается StayOnTop.
API располагает функциями по отображению этого окна. Вы можете их найти в том же SDK.


WhiteShadow   (2003-08-14 20:35:00) [6]

вот что написано в SDK

Applications create timers by using the SetTimer function. A new timer starts timing the interval as soon as it is created. An application can change a timer"s time-out value by using SetTimer and can destroy a timer by using the KillTimer function. To use system resources efficiently, applications should destroy timers that are no longer necessary.

Each timer has a unique identifier. When creating a timer, an application can either specify an identifier or have the system create a unique value. The first parameter of a WM_TIMER message contains the identifier of the timer that posted the message.

If you specify a window handle in the call to SetTimer, the application associates the timer with that window. Whenever the time-out value for the timer elapses, the system posts a WM_TIMER message to the window associated with the timer. If no window handle is specified in the call to SetTimer, the application that created the timer must monitor its message queue for WM_TIMER messages and dispatch them to the appropriate window. If you specify a TimerProc callback function, the default window procedure calls the callback function when it processes WM_TIMER. Therefore, you need to dispatch messages in the calling thread, even when you use TimerProc instead of processing WM_TIMER.


Наверх

Титульная страница Поиск, карта сайта Написать письмо