русский
Germany.ruForen → Архив Досок→ Programmierung

c# Можно ли перехватить событие в PrintDialog-е ?

01.04.19 17:27
Re: c# Можно ли перехватить событие в PrintDialog-е ?
 
Программист коренной житель
in Antwort Murr 01.04.19 17:12
Чью именно? ДотНет класса? Так у него ДРУГАЯ очередь...
У PrintDialog'а (который является наследником CommonDialog) есть
//
// Summary:
// Defines the common dialog box hook procedure that is overridden to add specific
// functionality to a common dialog box.
//
// Parameters:
// hWnd:
// The handle to the dialog box window.
//
// msg:
// The message being received.
//
// wparam:
// Additional information about the message.
//
// lparam:
// Additional information about the message.
//
// Returns:
// A zero value if the default dialog box procedure processes the message; a nonzero
// value if the default dialog box procedure ignores the message.
protected virtual IntPtr HookProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam);

И есть еще

//
// Summary:
// Defines the owner window procedure that is overridden to add specific functionality
// to a common dialog box.
//
// Parameters:
// hWnd:
// The window handle of the message to send.
//
// msg:
// The Win32 message to send.
//
// wparam:
// The wparam to send with the message.
//
// lparam:
// The lparam to send with the message.
//
// Returns:
// The result of the message processing, which is dependent on the message sent.
protected virtual IntPtr OwnerWndProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam);
От оригинального ПринтДиалога там только хандле и тот только в процессе выполнения ШовДиалог...

Не только. Ну и обработка сообщений от WinForms в ДотНете - это вполне себе годный вариант. Никакой "другой" очереди там нет. Очередь одна.

 

Sprung zu