Click here to Skip to main content
13,596,321 members
Click here to Skip to main content
Add your own
alternative version


22 bookmarked
Posted 3 Mar 2000

CPushPinFrame v1.11

, 3 Mar 2000
Rate this:
Please Sign up or sign in to vote.
A Freeware MFC PushPin property page dialog class.
  • Download source files - 19 Kb
  • Introduction

    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:

    Planned Enhancements
    Contacting the Author


    • 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 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 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::OnButton1() 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 ChangeAttachedPropertySheet() function.
    • 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 ChangeAttachedPropertySheet() function.
    • Sample app has been tidied up.

    V1.11 (2nd 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.

    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
    2nd June 1999 <p>


    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    About the Author

    PJ Naughter
    United States United States
    No Biography provided

    You may also be interested in...

    Comments and Discussions

    Generalproblem Pin
    Maher Tebourbi11-Sep-01 0:51
    memberMaher Tebourbi11-Sep-01 0:51 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
    Web03 | 2.8.180621.3 | Last Updated 4 Mar 2000
    Article Copyright 2000 by PJ Naughter
    Everything else Copyright © CodeProject, 1999-2018
    Layout: fixed | fluid