IPrintOemDriverUni::DrvYMoveTo method (prcomoem.h)
The IPrintOemDriverUni::DrvYMoveTo
method is provided by the Unidrv driver so that a rendering plug-in can notify the driver of cursor y-position changes.
Syntax
HRESULT DrvYMoveTo(
PDEVOBJ pdevobj,
INT y,
DWORD dwFlags,
[out] OUT INT *piResult
);
Parameters
pdevobj
Caller-supplied pointer to a DEVOBJ structure.
y
Caller-supplied value representing the number of units the cursor should be moved. The unit is defined by the MV_GRAPHICS flags in dwFlags.
dwFlags
One or more of the following caller-supplied bit flags:
Flag | Definition |
---|---|
MV_GRAPHICS |
If set, the y parameter's value is expressed in dots, based on the printer's current resolution. For example, if the y resolution is 150 DPI and y is 75, the movement is ?? inch.
If not set, the y parameter's value is expressed in master units. For example, if the y master unit is 600 and y is 300, the movement is ?? inch. |
MV_PHYSICAL |
If set, the y parameter's value is relative to the cursor origin.
If not set, the y parameter's value is relative to the printable area's origin. Cannot be set if MV_RELATIVE is set. |
MV_RELATIVE |
If set, specifies that the cursor should be moved y units from its current position.
If not set, specifies that the cursor should be moved y units from its origin. |
MV_UPDATE |
If set, specifies that Unidrv should update its current calculation of the cursor position without actually moving the cursor. (Should be set if IPrintOemUni::ImageProcessing has moved the cursor.)
If not set, specifies that Unidrv should update its current calculation of the cursor position and also move the cursor. |
[out] piResult
Receives the method-supplied result of subtracting the actual new cursor position from the requested new cursor position. This value might be zero, but it is always nonnegative.
Return value
The method must return one of the following values.
Return code | Description |
---|---|
|
The operation succeeded. |
|
The operation failed. |
|
The method is not implemented. |
Remarks
The IPrintOemDriverUni::DrvXMoveTo and IPrintOemDriverUni::DrvYMoveTo
methods allow a rendering plug-in to send image data to the printer spooler without causing the printer driver to lose track of the printer's cursor position. If you provide an IPrintOemUni::ImageProcessing method that sends image data directly to the print spooler instead of returning it to the printer driver, the method should call IPrintOemDriverUni::DrvXMoveTo
and IPrintOemDriverUni::DrvYMoveTo
.
Either of two techniques can be used for updating the cursor position:
-
Whenever an IPrintOemUni::ImageProcessing method needs to update the cursor position, it can call
IPrintOemDriverUni::DrvXMoveTo
orIPrintOemDriverUni::DrvYMoveTo
with the MV_UPDATE flag cleared. This causes Unidrv to send cursor commands to the print spooler and to update its internal calculation of the current cursor position. -
The IPrintOemUni::ImageProcessing method can update the cursor by sending cursor commands directly to the print spooler. When the method has finished its spooling operation, it can call
IPrintOemDriverUni::DrvXMoveTo
orIPrintOemDriverUni::DrvYMoveTo
with the MV_UPDATE flag set. This causes Unidrv to update its internal calculation of the current cursor position without sending cursor commands to the print spooler.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | prcomoem.h (include Prcomoem.h) |