Форум: "WinAPI";
Текущий архив: 2003.10.20;
Скачать: [xml.tar.bz2];
ВнизMessage. Помогите разобраться. Найти похожие ветки
← →
Alec (2003-08-14 20:05) [0]Хотелось бы узнать.
Приложение получает Message "от таймера". Кто его передаёт?
Ведь у таймера нет своего Handle (или всё-таки есть)- это же не окно.
И ещё.
При выводе Hint (и при пропадании) сообщение приходит от DeskTop (HWND = 0). Т.е. Hint рисуется напрямую на экран?
← →
WhiteShadow (2003-08-14 20:35) [1]вот что написано в 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.
← →
WhiteShadow (2003-08-14 20:40) [2]Забыл на счет хинта сказать %)
Хинт - это окно кдасса Tooltips_Class32 которое располагается StayOnTop.
API располагает функциями по отображению этого окна. Вы можете их найти в том же SDK.
← →
Alec (2003-08-14 22:18) [3]С таймером более-менее разобрался. Спасибо, что наставили на путь истинный (именно без кавычек). Очень помог SetTimer.
Я так понял, что таймер "прилеплен" к некоторому окну (или наоборот):- его-то HWND и берётся.
С хинтом ещё помучаюсь. Вот только...
.../найти в том же SDK/
SDK найду.
← →
WhiteShadow (2003-08-14 22:47) [4]если хотите могу этот раздел SDK выслать на мыло :)
← →
Alec (2003-08-14 22:55) [5]Не откажусь. Спасибо.
← →
WhiteShadow (2003-08-14 23:10) [6]хотя зачем мучаться? :) это есть и на http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shell cc/platform/commctls/tooltip/reflist.asp
Страницы: 1 вся ветка
Форум: "WinAPI";
Текущий архив: 2003.10.20;
Скачать: [xml.tar.bz2];
Память: 0.46 MB
Время: 0.006 c