Download source files - 19 Kb
, A freeware MFC PushPin property page dialog class.
This class emulates the properties dialogs as seen in
Microsoft Developer Studio. They sport a push pin button in the top left hand
corner which when unpinned automatically closes the property dialog when the
dialog loses focus. The MS implementation seems to use custom draw controls
which seems a shame when you lose all the functionality provided by the MFC
property sheet classes. The class of interest is
CPushPinFrame and is derived
CFrameWnd. It provides a look which is similar to the modal MFC property
When the property page is correctly setup it will look like:
- You will also need to download the CPushPinButton
class from my web site and copy in the PushPin.cpp and PushPin.h files from
that archive. The bitmaps
CPushPin uses are already in the demo program
- To use the class in your code simply include PushPin.cpp/.h and
PushPinFrame.cpp/.h in your project and
in which ever of your modules needs to make calls to the class.
- You should also ensure that the 4 bitmaps (namely IDB_PP_PINNED, IDB_PP_PINNEDEDGE,
IDB_PP_UNPINNED and IDB_PP_UNPINNEDEDGE) are copied over into your rc file from the
- To use the
CPushPinFrame class, you must create one on the heap and you then
attach a property sheet to it by using the SetAttachedProperySheet method. This method
CRuntimeClass so your property sheet will need DYNCREATE attributes.
- You can then use the
ChangeAttachedPropertySheet() of the
CPushPinFrame class to change the displayed property sheet.
- To see the class in action, have a look at the code in
in the module dlg.cpp in the sample app.
- Your code will need to include MFC either statically or dynamically.
16 April 1998
- Window now only closes if the window which is going active is owned by the same parent
as the pushpin frame. To see why this is a problem hook up help to a pushpinframe
and watch the window being closed when help is brought up.
V1.1 (1st June 1999)
- Now supports changing the attached property sheet through the new
- Did a bit of a tidy up of the source code.
- Now includes a HTML file describing the class and its usage.
- Unicode enabled the code.
- Code now compiles cleanly at warning level 4.
- Sample app now also demonstrates the new
- Sample app has been tidied up.
V1.11 (2nd June 1999)
- Updated code to work with the new v1.12 release of
- Removed a number of unnecessary comments in the code.
- Renamed a number of project files and workspace files to be more descriptive.
- Update a number of bugs / errors in this help file.
- Fixed a small clipping bug where the push pin was being clipped by the edge of the
- If you have any other suggested improvements, please let me know so that
I can incorporate them into the next release.
2nd June 1999