Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > "automation" in MMC property sheets?
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 31st May 15:22
26oo
External User
 
Posts: 1
Default "automation" in MMC property sheets?



I've tried searching for this, but i'm getting a lot of "noise" in the
results and not really finding anything useful...

i've added a property sheet to an existing collection of property
sheets via my extension snap-in... When a checkbox is clicked on my
property sheet i want to populate some of the fields in some of the
other property sheets (these other sheets belong to the parent node,
they are not part of my extension snap-in)...

what is the best approach here? is there any sample code for doing
this kind of automation within the context of an MMC snap-in? if not,
any advice on at least the best technology to use (eg. com automation)
would be great...

thank you!!
Jeff
  Reply With Quote


  sponsored links


2 31st May 15:22
eric voskuil
External User
 
Posts: 1
Default "automation" in MMC property sheets?



Jeff,

It sounds like you are writing a VB Designer property sheet extension
snap-in, and want to change settings on the extended snap-in's pages. If
you have no control over the extended snap-in's internal operation (IOW you
didn't write it), and the particular snap-in that you are extending doesn't
implement/do***ent a method for doing this (some do, such as AutoProf's
application and service plug-in model which is based on property page
extension), then you have to make changes directly to the window controls on
the property pages. However, note that if you are extending a multi-page
property sheet, pages other than the first page generally will not have been


manipulate them with Windows messages.

If the required page is not initialized, or if it is required to be
displayed before you send a message to it, then you may be able to send a
message to the windows property sheet (MMC wraps standard windows property
sheets), telling it to select the page. I believe you could also grab the
sheet pointer from the parent of your property page - kind of a hack but it
should work, and tell the sheet to activate a particular page (which might
not look so good to the end-user). Regardless, you'll most likely have to
post/send Windows messages to the controls on the page. Not pretty. The
MMC certainly isn't going to provide any assistance in this area. As for
automation, you'd have to check into the specifics of the extended snap-in -
it doesn't sound like a likely option.

Regards, Eric
"Jeff B." <26oo@cox.net> wrote in message news:4fe3d51f.0311151209.45bcd72c@posting.google.c om...
  Reply With Quote
3 31st May 15:22
matthias moetje
External User
 
Posts: 1
Default "automation" in MMC property sheets?


Hi,

we are doing this with an object that is passed with the
PropertySheet.AddPage function to all pages on a
sheet. We use the PropertyPage_Paint event to check
wether data (stored in the object) has changed.

(This only applies if you are using the VB SnapIn Designer)


Best regards,

--
Matthias Moetje
-------------------------------------
TERASENS GmbH
Ehrenbreitsteiner Straße 32
80993 München
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot de
www: http://www.terasens.de
-------------------------------------
  Reply With Quote
4 31st May 15:22
eric voskuil
External User
 
Posts: 1
Default "automation" in MMC property sheets?


Matthias,

Are you referring to property pages that you are creating, or another
company's pages that you are extending? I believe Jeff is talking about his
pages as an extension of another company's sheet. It sounds like you are
passing "InitData" to your pages via MMCPropertySheet.AddPage(), but I don't
think that would give you access to the primary sheet.

Eric
  Reply With Quote
5 31st May 15:22
matthias moetje
External User
 
Posts: 1
Default "automation" in MMC property sheets?


Eric,

you are right, I really missed that point.

You can solve the page initialization problem with:

for i = 1 to 10 (or 20)
on error resume next
PropertySheet.ActivatePage i
on error goto 0
next

PropertySheet.ActivatePage PropertySheet.GetPagePosition(hwnd)

The problem when manipulating another page with SendMessage API
could be that the data won't be saved, so you should be sure to display
that propertypage either during or after SendMessage. I do not know
if the dirty-setting will work for a page that is not currently displayed.

I don't see any other way here, too.


Best regards,

--
Matthias Moetje
-------------------------------------
TERASENS GmbH
Ehrenbreitsteiner Straße 32
80993 München
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot de
www: http://www.terasens.de
-------------------------------------
  Reply With Quote
6 31st May 15:22
eric voskuil
External User
 
Posts: 1
Default "automation" in MMC property sheets?


Jeff,

It sounds like you are writing a VB Designer property sheet extension
snap-in, and want to change settings on the extended snap-in's pages. If
you have no control over the extended snap-in's internal operation (IOW you
didn't write it), and the particular snap-in that you are extending doesn't
implement/do***ent a method for doing this (some do, such as AutoProf's
application and service plug-in model which is based on property page
extension), then you have to make changes directly to the window controls on
the property pages. However, note that if you are extending a multi-page
property sheet, pages other than the first page generally will not have been


manipulate them with Windows messages.

If the required page is not initialized, or if it is required to be
displayed before you send a message to it, then you may be able to send a
message to the windows property sheet (MMC wraps standard windows property
sheets), telling it to select the page. I believe you could also grab the
sheet pointer from the parent of your property page - kind of a hack but it
should work, and tell the sheet to activate a particular page (which might
not look so good to the end-user). Regardless, you'll most likely have to
post/send Windows messages to the controls on the page. Not pretty. The
MMC certainly isn't going to provide any assistance in this area. As for
automation, you'd have to check into the specifics of the extended snap-in -
it doesn't sound like a likely option.

Regards, Eric
"Jeff B." <26oo@cox.net> wrote in message news:4fe3d51f.0311151209.45bcd72c@posting.google.c om...
  Reply With Quote
7 31st May 15:22
matthias moetje
External User
 
Posts: 1
Default "automation" in MMC property sheets?


Hi,

we are doing this with an object that is passed with the
PropertySheet.AddPage function to all pages on a
sheet. We use the PropertyPage_Paint event to check
wether data (stored in the object) has changed.

(This only applies if you are using the VB SnapIn Designer)


Best regards,

--
Matthias Moetje
-------------------------------------
TERASENS GmbH
Ehrenbreitsteiner Straße 32
80993 München
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot de
www: http://www.terasens.de
-------------------------------------
  Reply With Quote
8 31st May 15:22
eric voskuil
External User
 
Posts: 1
Default "automation" in MMC property sheets?


Matthias,

Are you referring to property pages that you are creating, or another
company's pages that you are extending? I believe Jeff is talking about his
pages as an extension of another company's sheet. It sounds like you are
passing "InitData" to your pages via MMCPropertySheet.AddPage(), but I don't
think that would give you access to the primary sheet.

Eric
  Reply With Quote
9 31st May 15:22
matthias moetje
External User
 
Posts: 1
Default "automation" in MMC property sheets?


Eric,

you are right, I really missed that point.

You can solve the page initialization problem with:

for i = 1 to 10 (or 20)
on error resume next
PropertySheet.ActivatePage i
on error goto 0
next

PropertySheet.ActivatePage PropertySheet.GetPagePosition(hwnd)

The problem when manipulating another page with SendMessage API
could be that the data won't be saved, so you should be sure to display
that propertypage either during or after SendMessage. I do not know
if the dirty-setting will work for a page that is not currently displayed.

I don't see any other way here, too.


Best regards,

--
Matthias Moetje
-------------------------------------
TERASENS GmbH
Ehrenbreitsteiner Straße 32
80993 München
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot de
www: http://www.terasens.de
-------------------------------------
  Reply With Quote
10 31st May 15:22
26oo
External User
 
Posts: 1
Default "automation" in MMC property sheets?


Guys, I'm writing this in C++ using the general techniques presented
in the MMC SDK samples... i'm writing an extension snap-in for
Microsoft SMS so i don't have any control over the rest of the
property sheet... what options does that leave me?

thanks for the responses!
Jeff
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666