CPushPinButton v1.29
Welcome to CPushPinButton, A freeware MFC PushPin button class. The class is derived
from CButton and when used appears as follows:

Usage
- To use the class in your code simply include PushPin.cpp and PushPin.h in
your project and #include "PushPin.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
are copied over into your rc file from the PushPinFrameDemo.rc file.
- Create a dialog template with an owner-draw button positioned where you
want the push pin button. The size of the button in the template does not matter.
- Using Classwizard associate a CBitmap with the button you just created.
Then modify the declaration of the variable to make it a CPushPinButton instead
of CButton.
- To ensure that the class operates correctly when a color scheme change occurs,
You should call the ReloadBitmaps method in response to WM_SETTINGCHANGE or
WM_WININICHANGE messages.
- Your code will need to include MFC either statically or dynamically.
- As of v1.23, the class is now designed for VC 2017 or later. They will
not compile on earlier releases of VC.
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.29 (15 May 2022)
- Updated copyright details.
- Updated the code to use C++ uniform initialization for all variable
declarations.
v1.28 (3 May 2020)
- Fixed various Clang-Tidy static code analysis warnings in the code.
v1.27 (28 March 2020)
- Updated copyright details.
- Fixed more Clang-Tidy static code analysis warnings in the code.
v1.26 (30 December 2019)
- Fixed various Clang-Tidy static code analysis warnings in the code.
v1.25 (18 November 2019)
- Updated initialization of various structs to use C++ 11 list
initialization
v1.24 (5 June 2019)
- Updated copyright details.
- Updated the code to clean compile on VC 2019
v1.23 (31 December 2018)
- Updated copyright details.
- Fixed a number of C++ core guidelines compiler warnings. These changes
mean that the code will now only compile on VC 2017 or later.
v1.22 (27 December 2016)
- Updated copyright details.
- Updated the sample apps main icon
- Replaced all occurrences of NULL with nullptr throughout the codebase
- Updated the code to clean compile on VC 2010 to VC 2015. The code now
requires VC 2010 at a minimum.
v1.21 (27 August 2001)
- Fixed an access violation which was occuring in PreSubclassWindow on Windows
98.
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.
v1.14 (14 May 2000)
- Button now sends WM_COMMAND messages to the parent as a standard button
does.
v1.13 (12 January 2000)
- Fixed minor typo on the resource dialog.
v1.12 (2 June 1999)
- Added a number of comments to improvde code readibility.
- Changed the resouce id of the button bitmaps to more meaningful values.
- Class no longer uses message reflection to catch changes in the clicked
state. This means that parent classes can now catch the clicked notification.
- Code now uses mouse capturing which means that the button appears pressed
if you click and hold the left mouse button over the push pin. This gives the
pushpin class this standard button behaviour.
v1.11 (22 February 1999)
- A number of small code updates.
- Code now compiles cleanly at warning level 4.
- Code is now UNICODE enabled and build configurations are provided.
v1.1 (20 November 1997)
- Support non default color schemes.
- Supports dynamic changes to color schemes.
- Complete restructuring of code.
- Can now use an edged bitmap if you want to.
- Dropped support for Win16.
- Redid the example program.
- Simplified external usage of class.
v1.01 (26 November 1997)
v1.0 (7 December 1997)
- Minor code changes to fix a small redraw bug.
Contacting the Author
PJ Naughter
Email: pjna@naughter.com
Web: http://www.naughter.com
15 May
2022