Hi,

My printer(unidrv) driver has 3 propertysheets and a common OK and CANCEL
button.

Where can I handle these events. If Ok is pressed I want to access a field
in one propertysheet and if it is different from a certain registry value, I
want to update the Registry.

Thanks,
Siggi

RE: Driver's Propertysheets - OK or CANCEL event by pavel_a

pavel_a
Sat May 20 05:26:02 CDT 2006

See the SDK documentation on property *pages*
(note: the outer dialog that has ok and cancel button
is called "property sheet".
The tabs are called "property pages".)

Good luck,
--PA


"siggi" wrote:
> Hi,
>
> My printer(unidrv) driver has 3 propertysheets and a common OK and CANCEL
> button.
>
> Where can I handle these events. If Ok is pressed I want to access a field
> in one propertysheet and if it is different from a certain registry value, I
> want to update the Registry.
>
> Thanks,
> Siggi

RE: Driver's Propertysheets - OK or CANCEL event by siggie

siggie
Mon May 22 07:43:01 CDT 2006

Hi Pavel, thanks for your response.

since the outer dialog contains the ok and cancel buttons should´nt I look
up "property sheets" and not "property pages"? I did´nt find anything in the
SDK that could help me.

Anyways this is what I´ve been trying. In function OEMDevicePropertySheets
where the property pages are added I registered my callbackfunction(function
to handle any events) to a sheet, somehow it does´nt make sence to add this
to just any sheet, but I cannot see how I can access the main sheet for this
purpose.

LRESULT APIENTRY OEMDevicePropertySheets(PPROPSHEETUI_INFO pPSUIInfo, LPARAM
lParam)
{
......
switch(pPSUIInfo->Reason)
{
case PROPSHEETUI_REASON_INIT:
{
DWORD dwSheets = 0;
COMPROPSHEETUI Sheet;

memset(&Sheet, 0, sizeof(COMPROPSHEETUI));
Sheet.cbSize = sizeof(COMPROPSHEETUI);
Sheet.pfnCallBack = MyCallbackProc;

lResult = pPSUIInfo->pfnComPropSheet(pPSUIInfo->hComPropSheet,
CPSFUNC_ADD_PCOMPROPSHEETUI,
(LPARAM)&Sheet, (LPARAM)&dwSheets);
........

LONG APIENTRY MyCallbackProc( PCPSUICBPARAM pComPropSheetUICBParam )
//never gets called !!!
{
ASSERTMSG(0, "_CPSUICALLBACK XXXXXXXXXXXXXXX");
return CPSUICB_ACTION_NONE;
}
........

Hope you can give me a hint.
Cheers, Siggi

"Pavel A." wrote:

> See the SDK documentation on property *pages*
> (note: the outer dialog that has ok and cancel button
> is called "property sheet".
> The tabs are called "property pages".)
>
> Good luck,
> --PA
>
>
> "siggi" wrote:
> > Hi,
> >
> > My printer(unidrv) driver has 3 propertysheets and a common OK and CANCEL
> > button.
> >
> > Where can I handle these events. If Ok is pressed I want to access a field
> > in one propertysheet and if it is different from a certain registry value, I
> > want to update the Registry.
> >
> > Thanks,
> > Siggi

Re: Driver's Propertysheets - OK or CANCEL event by Pavel

Pavel
Mon May 22 19:12:08 CDT 2006

No idea... now this is not a driver question, please ask in relevant newsgroups:
microsoft.public.win32.programmer.ui (?)

Regards,
--PA

"siggi" <siggie@kogun.is> wrote in message news:0CFC38AC-D958-4E15-BEAA-D19EBAD85813@microsoft.com...
> Hi Pavel, thanks for your response.
>
> since the outer dialog contains the ok and cancel buttons should?nt I look
> up "property sheets" and not "property pages"? I did?nt find anything in the
> SDK that could help me.
>
> Anyways this is what I?ve been trying. In function OEMDevicePropertySheets
> where the property pages are added I registered my callbackfunction(function
> to handle any events) to a sheet, somehow it does?nt make sence to add this
> to just any sheet, but I cannot see how I can access the main sheet for this
> purpose.
>
> LRESULT APIENTRY OEMDevicePropertySheets(PPROPSHEETUI_INFO pPSUIInfo, LPARAM
> lParam)
> {
> ......
> switch(pPSUIInfo->Reason)
> {
> case PROPSHEETUI_REASON_INIT:
> {
> DWORD dwSheets = 0;
> COMPROPSHEETUI Sheet;
>
> memset(&Sheet, 0, sizeof(COMPROPSHEETUI));
> Sheet.cbSize = sizeof(COMPROPSHEETUI);
> Sheet.pfnCallBack = MyCallbackProc;
>
> lResult = pPSUIInfo->pfnComPropSheet(pPSUIInfo->hComPropSheet,
> CPSFUNC_ADD_PCOMPROPSHEETUI,
> (LPARAM)&Sheet, (LPARAM)&dwSheets);
> ........
>
> LONG APIENTRY MyCallbackProc( PCPSUICBPARAM pComPropSheetUICBParam )
> //never gets called !!!
> {
> ASSERTMSG(0, "_CPSUICALLBACK XXXXXXXXXXXXXXX");
> return CPSUICB_ACTION_NONE;
> }
> ........
>
> Hope you can give me a hint.
> Cheers, Siggi
>
> "Pavel A." wrote:
>
>> See the SDK documentation on property *pages*
>> (note: the outer dialog that has ok and cancel button
>> is called "property sheet".
>> The tabs are called "property pages".)
>>
>> Good luck,
>> --PA
>>
>>
>> "siggi" wrote:
>> > Hi,
>> >
>> > My printer(unidrv) driver has 3 propertysheets and a common OK and CANCEL
>> > button.
>> >
>> > Where can I handle these events. If Ok is pressed I want to access a field
>> > in one propertysheet and if it is different from a certain registry value, I
>> > want to update the Registry.
>> >
>> > Thanks,
>> > Siggi



Re: Driver's Propertysheets - OK or CANCEL event by Chris

Chris
Wed May 24 09:14:45 CDT 2006

Not sure if printer drivers have some other magic related to prop sheets,
but here's some info.

http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/propsheet/propsheet.asp

"A property sheet sends notification messages to the dialog box procedure
for a page when the page is gaining or losing the activation and when the
user clicks the OK, Cancel, Apply, or Help button. The notifications are
sent in the form of WM_NOTIFY messages. The lParam parameter is the address
of an NMHDR structure that includes the window handle to the property sheet
dialog box."


Chris

"siggi" <siggie@kogun.is> wrote in message
news:DF207BE9-C28C-4F05-8E70-522E10EA612A@microsoft.com...
> Hi,
>
> My printer(unidrv) driver has 3 propertysheets and a common OK and CANCEL
> button.
>
> Where can I handle these events. If Ok is pressed I want to access a
> field
> in one propertysheet and if it is different from a certain registry
> value, I
> want to update the Registry.
>
> Thanks,
> Siggi