SendMessagesTo

The SendMessagesTo function is used to direct the Document Converter product to send all event messages to a specific window or application. This is more efficient than the default behavior of the printer driver, where it would send messages to all running applications and thus slow down the system significantly.

 

Syntax

ActiveX:

long SendMessagesTo(BSTR WndClass)

DLL:

long SendMessagesTo(HANDLE hPrinter, LPCSTR szWndClass)

 

Parameters

WndClass, szWndClass

Class of the Window to which the events are sent.

hPrinter

Handle to printer returned by any of the DriverInit function calls.

 

Return Value

The return value is 1 if the function is successful, 0 otherwise.

 

Remarks

This function should be used in conjunction with the BroadcastMessages option of the Document Converter products.

 

Example

// send messages to our application only
TCHAR className[64];
GetClassName( m_hWnd, className, sizeof(className) );
SendMessagesTo( theApp.m_converter, className );