Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "WinAPI";
Текущий архив: 2002.12.26;
Скачать: [xml.tar.bz2];

Вниз

Как в консоли сделать таймер?   Найти похожие ветки 

 
Cosmic   (2002-11-10 16:49) [0]

Как в консольном приложении инициализировать таймер? (хочу, чтобы программа кажде десять минут меняла обои винды и при этом была не больше 20 кБ весом. И еще желательно без окошка :))


 
Song   (2002-11-10 16:53) [1]

SetTimer ?


 
Cosmic   (2002-11-10 17:12) [2]

А поподробнее?


 
Polevi   (2002-11-10 17:15) [3]

The SetTimer function creates a timer with the specified time-out value.

UINT SetTimer(

HWND hWnd, // handle of window for timer messages
UINT nIDEvent, // timer identifier
UINT uElapse, // time-out value
TIMERPROC lpTimerFunc // address of timer procedure
);


Parameters

hWnd

Identifies the window to be associated with the timer. This window must be owned by the calling thread. If this parameter is NULL, no window is associated with the timer and the nIDEvent parameter is ignored.

nIDEvent

Specifies a nonzero timer identifier. If the hWnd parameter is NULL, this parameter is ignored.

uElapse

Specifies the time-out value, in milliseconds.

lpTimerFunc

Points to the function to be notified when the time-out value elapses. For more information about the function, see TimerProc.
If lpTimerFunc is NULL, the system posts a WM_TIMER message to the application queue. The hwnd member of the message"s MSG structure contains the value of the hWnd parameter.


 
Cosmic   (2002-11-10 18:41) [4]

Я хэлпы читать умею :) Мне бы примерчик...


 
Polevi   (2002-11-11 11:31) [5]

читать умеешь учись понимать


 
Polevi   (2002-11-11 11:48) [6]

program Project2;
{$APPTYPE CONSOLE}
uses SysUtils, Windows;

procedure TimerProc(
h:HWND;
uMsg:DWORD;
idEvent:DWORD;
dwTime:DWORD
);stdcall;
begin
Writeln("Hello world!");
end;

var
msg:TMsg;
begin
// Insert user code here
SetTimer(0,1,1000,@TimerProc);
while GetMessage(msg,0,0,0) do DispatchMessage(msg);
end.


 
Cosmic   (2002-11-11 19:46) [7]

Thanx ::::))))::::



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

Форум: "WinAPI";
Текущий архив: 2002.12.26;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.006 c
14-86163
Namo
2002-11-30 15:20
2002.12.26
Неблагодарное дело ли это...


3-85787
Tankist
2002-12-05 19:17
2002.12.26
массив


14-86151
delphist2
2002-12-06 13:32
2002.12.26
Ошибка в проге


3-85832
Анонимщик
2002-12-06 14:46
2002.12.26
Системные таблицы; Delphi6; Interbase


14-86130
C.I.A.
2002-12-04 21:06
2002.12.26
DelphiX





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский