SetStatusBackWnd¶
Description
Registers the window handle of a button for which the click event is called and the variable to set the printer status when a change in the printer status is detected.
Syntax
INT SetStatusBackWnd( INT i_hdl, HANDLE i_Wnd, LPDWORD o_status )
Parameter
i_hdl
API handle
Specify the API handle retrieved by OpenMonPrinter.
i_Wnd
Window handle
Specify the window handle of the button that sends the click event.
When NULL is specified, this API is canceled.br />
o_status
Printer status variable
Specify the variable to store the printer status.
Return value
On success: Returns 0. On failure: Returns an error code. See "Error Code List" for details of the error code.
Remarks
- When the button window handle is registered by this API, the click event is called with the current printer status.
- Even when the printer status is received, the click event will not be called when the printer status has not changed from when it was last received.
- When reconnection to the printer is detected, the printer status is the status received last at the time.
- When this API is called in the state that the button window handle is registered, the already registered button window handle becomes disabled and a new button window handle is registered.
- Even when this API is called specifying the already registered and enabled button window handle again, the printer status response immediately after it is performed.
- This API is canceled by the following APIs:
- CloseMonPrinter
- CancelStatusBack
- The following APIs cannot be called from the processing routine of the called click event with the same API handle:
- CloseMonPrinter
- SetStatusBackFunction
- SetStatusBackWnd
- CancelStatusBack
- The return value of the click event is ignored.
- The time from receiving the printer status until calling the click event is not guaranteed.
- See "Printer Status List" for details of the printer status.