Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "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
3-65336
Alex
2003-09-29 09:55
2003.10.20
Перенос базы из Access-a в MSSQL


1-65433
Андрей Л.
2003-10-07 15:11
2003.10.20
Очистка всех Edit ов на форме


4-65680
й
2003-08-15 19:09
2003.10.20
Как найти в реестре строку?


3-65329
Nucl
2003-09-29 11:28
2003.10.20
Странное поведение ADO Query


1-65454
sagchat
2003-10-06 17:41
2003.10.20
Как запретить изменять размер формы?





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский