Propertysheet Handler Appwizard

Property Sheet Wizard is a Visual C++ 4.0 AppWizard (it won't work with 5.0 for some reason...I havn't tested it with 6.0 though) that creates a shell extension DLL that adds another property page to the Properties dialog, as shown on the left. (Right-click on a file and choose Properties to display this dialog). The DLL supports self registration, that is you can register it with regsvr32.

To use this AppWizard, first it needs to be copied to your \BIN\IDE directory (for example mine is C:\MSDEV\BIN\IDE), then it will be displayed in the New Project dialog in Visual C++. Choose it to create a new property sheet file handler.

There are no steps to the AppWizard, it just creates a generic shell extension DLL.

For some reason, the .DEF file does not get added, so you will need to add PROPSHEET.DEF to your project before compiling. Also make sure to use uuidgen to generate a new CLSID for the DLL in Properties.h when developing your own shell extensions.

By default, the AppWizard creates a handler for a folder. Change the parameter to AddSymbol in CProperties::CPropertiesFactory::UpdateRegistry() in Properties.cpp to the alais for the file type:


BOOL CProperties::CPropertiesFactory::UpdateRegistry(BOOL bRegister)
{
	CRegisterClass reg(m_clsid, "Bitmap.Properties");

	VERIFY(reg.AddSymbol("bmpfile") == 3);   // Zero based... really %4
	reg.AddEntry("CLSID\\%1\\InProcServer32", "Apartment", 
		"ThreadingModel");
	...
}
In the example above we are making a handler for bitmaps, assuming the alias for bmp files is "bmpfile". Note that is it not the filenames extension. Look in HKEY_CLASSES_ROOT\. to figure out the alais of a specific filename extension. When developing your own handlers, make sure to change "PropSheet.Properties" to something more approiate.

I did not include an example with this project because it is very easy to make. Just create a new project using the AppWizard, compile and register it. (Register DLLs by running regsvr32 or choosing Register Control from the Tools menu when the project is loaded in Visual C++). Then right-click on any folder on your hard disk and choose Properties. Something similar to this should appear.

This code was originally taken from Visual C++ 4.0 How-To, a very useful book by Scott Stanfield and Ralph Arversen. I wrapped it up into a nice AppWizard and made it generic (it used to display subfolders there sizes of the selected folder).

Download source - 52.3 KB



Comments

  • Ce sont les plus chaudes lisseur ghd au printemps 2013

    Posted by jkrzuz664 on 07/16/2013 10:01am

    The Amazing GHD Rich Ruby Red Metallic Collection cadeau vous définissez l'un des trois nouveaux Samlinger utgitt dans le cadre d'Metallic utvalg de GHD, pour Noël 2012. Il a donné vakre vu à l'intérieur de maison SUVEREN GHD Gold Classic Styler, dans un "Ruby Red Rich" effet finish.Advanced ovn technologie céramique métallique pour les résultats complets lisses, brillants. Tension universelle pour ytelse cohérente atteint Reiser. Plater noir élégant avec et SNEV de Gnisten pour le style ulempe-libre. Vink Lede plaqueur pour enklere Kröller og Bolger. Ekstra Tuyau ligne de crédit renouvelable 2.7m pour la liberté pendant styling.It vous egnet pour les types de cheveux alle [url=http://ghdpascherfer.webgarden.es/]lisseur ghd styler[/url] La meilleure chose à faire lorsque vous essayez de trouver défrisants bon marché est d'examiner la véritable valeur de n'importe quelle marque. Si vous allez à débourser plus de 100 £ pour quelqu'un, assurez-vous que vous obtenez votre argent vaut. Lire les commentaires des consommateurs, car ce sont les commentaires les plus honnêtes que vous obtiendrez dans l'industrie. Cela vous aidera à prendre la bonne décision lorsque vous êtes à la recherche pour les cheveux rettetang.Selvfølgelig pas cher est rose ghd n'est pas seulement une norme de tourbière styler ghd. C'est un ghd qui a été conçu pour recueillir des fonds pour des organisations caritatives du cancer du sein. En effet, un tel succès a été redresseurs rose que selon GHD il a abouti à 1 million de livres étant donné. Il ya aussi un grand succès auprès des célébrités comme Jennifer Aniston et Victoria Beckham. [url=http://ghdpascherferfr.webgarden.com/]ghd pas cher[/url] La meilleure chose à faire lorsque vous essayez de trouver défrisants bon marché est d'examiner la véritable valeur de n'importe quelle marque. Si vous allez à débourser plus de 100 £ pour quelqu'un, assurez-vous que vous obtenez votre argent vaut. Lire les commentaires des consommateurs, car ce sont les commentaires les plus honnêtes que vous obtiendrez dans l'industrie. Cela vous aidera à prendre la bonne décision lorsque vous êtes à la recherche pour les cheveux rettetang.Selvfølgelig pas cher est rose ghd n'est pas seulement une norme de tourbière styler ghd. C'est un ghd qui a été conçu pour recueillir des fonds pour des organisations caritatives du cancer du sein. En effet, un tel succès a été redresseurs rose que selon GHD il a abouti à 1 million de livres étant donné. Il ya aussi un grand succès auprès des célébrités comme Jennifer Aniston et Victoria Beckham.

    Reply
  • GHD kaldet Alopeci, det er dybest set den overdrevne hÃ¥rtab af én person

    Posted by motherdhmm on 05/30/2013 11:26am

    [url=http://www.blog.cheapbeatsbydre.co.nz/]beats by dre nz[/url] Alle de bedste Glattejern lidelse artikler kan blive akklimatiseret med hårudglatningsmiddel at tilpasse hair.Another en masse fantastiske amore af GHD Glattejern Sale sin slå vilkårlig spænding fordel, der giver dig mulighed for at bruge håret i ethvert land og få ovenstående kølige GHD realisering bagefter eventuelle ophør på grund af spændingen complication.Many organer vil købe ghd, så vil de spare mere, på ovennævnte tidspunkt, de vil opnå selv bliver tilføjet charmerende. [url=http://www.buy-beatsdrdre.com/category/monster-beats-australia]monster beats australia[/url] Som små som du kunne have ghd fladjern mulighed for at købe ved hjælp af et bestemt håndtere derude som supplement til investere i [url=http://www.blog.cheapbeatsbydre.co.nz/]beats by dre nz[/url] 2011 ghd glattejern nye klassiske logo, og endda ændre den farve, spille nyt materiale, udover, at skabe en god ghd glat hår farver og udsøgt design af de små detaljer i den fantastiske sans for stil, GHD glattejern aftale som en smuk design, kombineret med en unik sans for stil, kombineret med elegant, effektiv brug af ressourcerne kan genanvendes. Begrebet miljøbeskyttelse tilføjes i. Tilføjer en masse folk som ghd glat hår.

    Reply
  • Nice one there

    Posted by Slalaleasyday on 03/12/2013 09:50pm

    Nice Post. ---------- I love http://youtube.com

    Reply
  • Hickey assert store car park that will MacKerricher beachfront

    Posted by dupsfinvjlit on 02/06/2013 01:46am

    [url=http://www.beatsbydreukk.com][b]beats by dre[/b][/url] yaanywnaxnzybeats by dre

    Reply
  • Add data to the PropertySheet tab from a dialog box

    Posted by Legacy on 06/01/2000 12:00am

    Originally posted by: Priya

    Hi,
    Could anyone help me to add a property page to the propertysheet handler and also fill the controls in the new page with the values from my formview application for each file.

    Is this possible??Is there any good books to read from?

    Thank you
    Priya

    Reply
  • Unable to compile code generated by wizard under msc v6

    Posted by Legacy on 01/20/2000 12:00am

    Originally posted by: Robert Fernando

    Hi all,
    I managed to recompile the wizard to get it to generate files under v6, but
    when I compile a file generated with the wizard it I get the following error.

    f:\safeboot.40\encrprop\Properties.cpp(172) : error C2664:
    'CreatePropertySheetPageA' : cannot convert parameter 1 from 'struct
    _AFX_OLDPROPSHEETPAGE *' to 'const struct _PROPSHEETPAGEA *'
    Types pointed to are unrelated; conversion requires
    reinterpret_cast, C-style cast or function-style cast
    Error executing cl.exe.

    This error occurs in the function STDMETHODIMP
    CProperties::XShellPropExt::AddPages (LPFNADDPROPSHEETPAGE lpfnAddPage,
    LPARAM lParam)
    on the line HPROPSHEETPAGE hPSP = CreatePropertySheetPage(&pPage->m_psp);

    Is there a fix for this.

    MSC v6 Enterprise Edition no service packs
    Microsoft Platform SDK for Windows 2000 RC2
    os being used win 98

    Thanks
    Robert Fernando

    Reply
  • How do you add these property pages to control panels.

    Posted by Legacy on 08/04/1999 12:00am

    Originally posted by: Shaun Ruffell

    I sucessfully used this wizard to build and add property pages to different files. What I would like to do though is add a new page to the Display Control Panel. Everything I have read in the MSDN seems to imply that the property page provider is the same. The only difference for adding pages is that you have to place the GUID of the property page provider under the HKLM\Software\Microsoft\Windows\CurrentVersion\Control Folders\Display\Shellext key. I can duplicate the Plus! page which is added to the Display Control panel, but am unable to add my own.

    Does anyone know how to do this or know where there is a sample of how to add a page to a control panel applet?

    Shaun

    Reply
  • propsheet wizard

    Posted by Legacy on 02/15/1999 12:00am

    Originally posted by: Den Semenenko

    Works perfectly after recompiling with VC5.
    Just have to add blank *.clw to \templates....

    Reply
  • Property Sheet Handler AppWizard

    Posted by Legacy on 02/13/1999 12:00am

    Originally posted by: Brian Hart

    I just tried to use the Property Sheet Handler AppWizard with Visual C++ 6.0 and it does not work.

    Just wanted to let the CodeGuru community know, as the developer has mentioned he didn't know whether or not the code works with Visual C++ 6.

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: December 11, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Market pressures to move more quickly and develop innovative applications are forcing organizations to rethink how they develop and release applications. The combination of public clouds and physical back-end infrastructures are a means to get applications out faster. However, these hybrid solutions complicate DevOps adoption, with application delivery pipelines that span across complex hybrid cloud and non-cloud environments. Check out this …

  • VMware vCloud® Government Service provided by Carpathia® is an enterprise-class hybrid cloud service that delivers the tried and tested VMware capabilities widely used by government organizations today, with the added security and compliance assurance of FedRAMP authorization. The hybrid cloud is becoming more and more prevalent – in fact, nearly three-fourths of large enterprises expect to have hybrid deployments by 2015, according to a recent Gartner analyst report. Learn about the benefits of …

Most Popular Programming Stories

More for Developers

RSS Feeds