Home   Index   About
Ultimate Pack


Custom Search
Replacing Control Panel Pages

The ReplacePage member function is called only by Control Panel applications. It allows you to replace the property sheet of a standard Control Panel application with a custom page. For example, if a mouse manufacturer adds extra buttons to its mouse, the manufacturer can replace the standard Mouse Control Panel's "Buttons" property sheet page. The ReplacePage member function is not called by the shell because the shell does not have any property sheet pages that can be replaced by a shell extension. Currently, only Control Panel applications call this member function, but other property sheet suppliers could use this member function to allow their property sheet pages to be replaced.

Each property sheet handler that allows a property sheet page to be replaced must specify the registry location where other handlers that replace pages register themselves. For standard Control Panel applications, this location is defined by the REGSTR_PATH_CONTROLSFOLDER macro in the REGSTR.H file. The macro defines the key under the HKEY_LOCAL_MACHINE key in which all Control Panel property sheet page replacement handlers must register. For example, a property sheet handler that needs to replace a property sheet page for the Mouse Control Panel would register a property sheet extension handler in the following registry location.

HKEY_LOCAL_MACHINE

REGSTR_PATH_CONTROLSFOLDER

Mouse

shellex

PropertySheetHandlers = NewMousePage

NewMousePage = {00000000-1111-2222-3333-00000000000002}

In addition, a property sheet handler that allows replaceable pages must define identifiers for each page that can be replaced.

Standard Control Panel applications define this location in the REGSTR.H and CPLEXT.H header files. In REGSTR.H, the REGSTR_PATH_CONTROLSFOLDER macro defines the key under the HKEY_LOCAL_MACHINE key in which all Control Panel property sheet page replacement handlers must register. CPLEXT.H defines the subkey for each Control Panel application that contains a replacable property sheet page: \Mouse for a Mouse Control Panel application and \Keyboard for a Keyboard Control Panel application.

Standard Control Panel applications define these identifiers in CPLEXT.H. For example, CPLPAGE_MOUSE_BUTTONS defines the identifier for the Mouse Control Panel's Buttons page, and CPLPAGE_KEYBOARD_SPEED defines the identifier for the Keyboard Control Panel's Speed page.


Last news from Greatis Software

Nostalgia .Net     Nostalgia .Net     .Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes.  More »

Recommended software for developers

Ultimate Pack for Delphi and C++ Builder     Ultimate Pack     Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price.  More »

Form Designer .Net     Form Designer .Net     Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro!  More »

Print Suite .Net     Print Suite .Net     Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available  More »

Gradient Controls .Net     Gradient Controls .Net     Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available  More »

iGrid     Greatis iGrid     iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors.  More »


All the contacts and projects

Dmitry Vasiliev (just.dmitry)

Related Links

Software for Visual Studio .NET developers
Software for Delphi and C++ Builder developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET

More Online Helps

Win32 Programmer's Reference
Win32 Multimedia Programmer's Reference
OLE Programmer's Reference
Microsoft Windows Pen API Programmer's Reference
Microsoft Windows Sockets 2 Reference
Microsoft Windows Telephony API (TAPI) Programmer's Reference
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008-2012 Free Tech Secrets ;) greatis just4fun network just4fun