CPushPinFrame v1.21
Welcome to CPushPinFrame, 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
from CFrameWnd. It provides a look which is similar to the modal MFC property
sheets.
When the property page is correctly setup it will look
like:

Usage
- 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
supplied with CPushPinFrame.
- To use the class in your code simply include
PushPin.cpp/h and PushPinFrame.cpp/h in your project and #include "PushPinFrame.h" in which
ever of your modules needs to make calls to the class.
- You should also ensure that
the bitmaps IDB_PUSHPIN & IDB_PUSHPIN_HELP and the string resources IDS_PUSHPIN_HELP_TOOLTIP
& IDS_PUSHPIN_PINNING_TOOLTIP and the dialog resource IDD_PUSHPIN_PAGE0 are copied over into your
rc file from the PushPinFrameDemo.rc file.
- 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 uses 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
"CDemoAppDlg::OnButton1()" and "CDemoAppDlg::OnButton2()"
in the module "dlg.cpp"
in the sample app.
- Your code will need to include MFC either statically or dynamically.
Copyright
You are allowed to include the source code in any product
(commercial, shareware, freeware or otherwise) when your product is released in
binary form. You are allowed to modify the source code in any way you want
except you cannot modify the copyright details at the top of each module. If you
want to distribute source code with your application, then you are only allowed
to distribute versions released by the author. This is to maintain a single
distribution point for the source code.
History
V1.0 (16 April 1998)
V1.1 (1 June 1999)
- Now supports changing the attached property sheet through the new
ChangeAttachedPropertySheet function.
- Did a bit of a tidy up of the source code.
- Now includes HTML file (this 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 ChangeAttachedPropertySheet
function.
- Sample app has been tidied up.
V1.11 (2 June 1999)
- Updated code to work with the new v1.12 release of
CPushPinButton
- 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 property sheet
V1.2 (8 March 2001)
- Updated copyright information
- Updated the pushpin frame and pushpin classes to behave exactly
like their counterparts in MS Developer Studio. Thanks to Abdulah DEDIC for doing all the hard work.
- Added support for tooltips just like MS Developer Studio.
V1.21 (27 August 2001)
- Now uses v1.21 of my PushPin class
PLANNED
ENHANCEMENTS
- If you have any other suggested
improvements, please let me know so that I can incorporate them into the next release.
CONTACTING
THE AUTHOR
PJ Naughter
Email: pjna@naughter.com
Web: http://www.naughter.com
27 August 2001