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

Вниз

отловить WM_SPOOLERSTATUS   Найти похожие ветки 

 
Zevsus ©   (2003-05-22 11:33) [0]

Здравствуйте!
я пытался отловить WM_SPOOLERSTATUS разными способами:
таким

function WindowProc(wnd:HWND; Msg : Integer; Wparam:Wparam; Lparam:Lparam):Lresult;
stdcall;
Begin
case msg of
wm_SpoolerStatus :
showmessage("hello!");
end;
End;

и таким
type
TForm1 = class(TForm)
private
{ Private declarations }
procedure WM_SpoolerStatus(var Msg : TWMSPOOLERSTATUS);
message WM_SPOOLERSTATUS;
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}
procedure TForm1.WM_SpoolerStatus(var Msg : TWMSPOOLERSTATUS);

begin
showmessage(intToStr(msg.JobsLeft)+" Jobs currenly in spooler");
msg.Result := 0;
end;

и даже таким
procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
begin
if Msg.message = WM_SPOOLERSTATUS then ListBox1.Items.Add(inttostr(msg.lParam)+" ");
end;


Всё равно, при печати никаких сообщений я не получаю :(
помогите плз :((


 
Игорь Шевченко ©   (2003-05-22 11:59) [1]

Applications should not assume that they will receive a WM_SPOOLERSTATUS message for every change in spooler status.

Windows 2000/XP: The WM_SPOOLERSTATUS message is not sent. To be notified of changes to the print queue status, use FindFirstPrinterChangeNotification and FindNextPrinterChangeNotification. The following code outlines how this might be done.



 
Zevsus ©   (2003-05-23 13:47) [2]

спасибо :)



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

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

Наверх




Память: 0.47 MB
Время: 0.022 c
7-78179
dim-
2003-05-14 21:28
2003.07.24
Как отследить из какой программы была послана печать и сколько ко


11-77814
IZVER
2002-11-05 17:01
2003.07.24
локализация KOL-приложений


1-77976
bloodman
2003-07-10 23:14
2003.07.24
Реестр


1-77960
R
2003-07-11 07:38
2003.07.24
Уничтожение массива из списков


14-78075
Кен
2003-07-07 07:24
2003.07.24
А есть ли в Дельфи стэк ? По аналогии с тем, что использует проце