Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

UI customization of Unidrv UI

24 views
Skip to first unread message

Kiran

unread,
Oct 17, 2003, 12:03:40 AM10/17/03
to
Hi,
I'm developing a Unidrv mini driver. Is it possible to
completely remove the UI provided GPD and use my own
design of UI by using a UI plug-in? i.e I want to
remove 'Layout', 'Paper/Quality' pages and use my own
property sheets.

Thanks,
Kiran

Bobby Mattappally [MS]

unread,
Oct 17, 2003, 12:55:48 PM10/17/03
to

Thanks,
Kiran


Kiran,

You cannot with Unidriv minidriver.
This can be done in postscript minidriver using
IPrintOemUI2::HideStandardUI.

Thank you,
Bobby Mattappally
Microsoft DDK Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Mupopa Tshibuabua

unread,
Oct 21, 2003, 2:49:45 AM10/21/03
to
Yes, you can remove the "'Layout', 'Paper/Quality' " and
replace them with your own.

Details from the DDK documentation below:

-Mupopa

>-----Original Message-----
>
>
>Hi,
>I'm developing a Unidrv mini driver. Is it possible to
>completely remove the UI provided GPD and use my own
>design of UI by using a UI plug-in? i.e I want to

>remove pages and use my own

>property sheets.
>
>Thanks,
>Kiran
>
>
>Kiran,
>
>You cannot with Unidriv minidriver.
>This can be done in postscript minidriver using
>IPrintOemUI2::HideStandardUI.
>
>Thank you,
>Bobby Mattappally
>Microsoft DDK Support
>
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>

Actually, you can HIDE the UNIDRV provided UI. Please
check the DDK documentation on "Modifying a Driver-
Supplied Property Sheet Page".

Essentially, you hide selected pages, and then add your
own pages:

From the DDK:

Modifying a Driver-Supplied Property Sheet Page

A UI plug-in can modify Unidrv-supplied or Pscript5-
supplied property sheet pages by implementing the
IPrintOemUI::CommonUIProp method and a callback function.

The IPrintOemUI::CommonUIProp method is used by the UI
plug-in to specify a set of option items that CPSUI can
add, remove, or replace within either the printer property
sheet's Device Settings page or the document property
sheet's Layout, Paper/Quality, and Advanced pages.

The callback function, of type OEMCUIPCALLBACK, is used to
process user modifications to customized option items.

Adding Option Items

Your UI plug-in must describe new option items by placing
them in an array of OPTITEM structures supplied by the
driver. The driver's printer interface DLL calls the UI
plug-in's IPrintOemUI::CommonUIProp method twice. The
first time the method is called, it should return the
number of OPTITEM structures required. The driver
allocates space for an OPTITEM array and describes the
array in an OEMCUIPPARAM structure. The driver calls
IPrintOemUI::CommonUIProp again, supplying the address of
the OEMCUIPPARAM structure, so the method can load the
OPTITEM structures with option descriptions.

Removing Option Items

To remove an option from a property sheet page that is
supplied by Unidrv or Pscript5, your UI plug-in's
IPrintOemUI::CommonUIProp method can traverse the array of
OPTITEM structures pointed to by the OEMCUIPPARAM
structure. For each option that you'd like to remove from
the property sheet, you can set the OPTITEM structure's
OPTIF_HIDE flag. (Note that this does not actually remove
the option; it hides the option from the user so that its
default value cannot be changed.)

Replacing Option Items

To replace an option in a property sheet page that is
supplied by Unidrv or Pscript, you should follow the
instructions under Removing Option Items to remove the
existing option item, then follow the instructions under
Adding Option Items to create a new option item to replace
the old one.

Handling Modifications to Customized Option Values

In order to process user modifications to customized
option items, you must provide at least one callback
function. You can either specify a single callback
function that handles options for both the document
property sheet and the printer property sheet, or you can
specify a separate function for each. These callbacks are
of type OEMCUIPCALLBACK.

A callback function is specified by placing its address in
an OEMCUIPPARAM structure. The UI plug-in receives the
address of this structure as input to its
IPrintOemUI::CommonUIProp method.

When a user opens the printer property sheet or document
property sheet and modifies options, CPSUI calls the
printer driver's printer interface DLL. This DLL processes
option values contained in its own OPTITEM structures.
Then for each UI plug-in, the printer interface DLL calls
the OEMCUIPCALLBACK-typed callback function that was
previously specified by IPrintOemUI::CommonUIProp.


Kiran

unread,
Oct 21, 2003, 8:32:45 AM10/21/03
to
Hi,
Thank you. As far as I know, Hiding the UI can be done
only for features (like Page order,Duplex) not property
sheets(like Layout). If it is possible to hide property
sheets also, please let me know.

Thanks
Kiran

Bobby Mattappally [MS]

unread,
Oct 21, 2003, 2:32:34 PM10/21/03
to

Kiran, Mupopa,

The doc Mupopa refered to talks about removing/modifying the individual
items in a property sheet page.
Not removing the pages itself, which was the original question.

Hope this makes sense.

Thank you,
Bobby Mattappally
Microsoft DDK Support

This posting is provided "AS IS" with no warranties, and confers no rights.

0 new messages