Archive
Archive for February, 2016
CTreeOptionsCtrl v1.74 (Obsolete)
February 28, 2016
Comments off
- Please note that I have discontinued development of this code and it is now considered obsolete. This is because as of Visual Studio 2008 with the MFC Feature Pack, there is a new GUI CMFCPropertyGridCtrl class which implements pretty much all the functionality of CTreeOptionsCtrl. I have reviewed the "NewControls" MFC sample which demonstrates CMFCPropertyGridCtrl as well as a lot of the other Feature Pack classes. With this new class, it is relatively easily to implement:
- Hierarchical items are supported via the CMFCPropertyGridProperty::AddSubItem method
- Check boxes can be implemented either via setting the value of a CMFCPropertyGridProperty property to a VT_BOOL or using a custom class derived from CMFCPropertyGridProperty. In the NewControls sample, this corresponds most closely to the class called "CCheckBoxProp".
- You could implement radio buttons using a custom class derived from CMFCPropertyGridProperty although you would be better advised to implement this using the CMFCPropertyGridProperty::AddOption method to add all possible values to one property instead.
- The "Your First Name" sample property in my code is supported out of the box using the in place editor support of CMFCPropertyGridCtrl
- The "Day of the Week" and "Font Name combo" sample properties in my code are supported via the CMFCPropertyGridProperty::AddOption method
- If you want to link the state of one property to another such as the "Security" sample properties then you would need to implement custom classes derived from CMFCPropertyGridProperty
- The "Rating" sample property in my code is supported via the CMFCPropertyGridProperty::EnableSpinControl method
- The "File edit box" and "Folder edit box" properties in my code are supported via the CMFCPropertyGridFileProperty class
- The "Color selector" property in my code is supported via the CMFCPropertyGridColorProperty class
- The "Font Selector" property in my code is supported via the CMFCPropertyGridFontProperty class.
- The "Boolean combo" property in my code is supported via setting the value of a CMFCPropertyGridProperty property to a VT_BOOL.
- The "Date Example" and "Time Example" properties in my code can be implemented using a custom class derived from CMFCPropertyGridProperty. I was able to implement both of these using just c. 80 lines of code
- The "IP address Selector" property in my code requires a bit more code to implement than the date or time example as I needed to modify the CMFCPropertyGridCtrl::m_nRowHeight value to avoid clipping when the IP address in place control was drawn. To change the m_nRowHeight value I needed to implement a class derived from CMFCPropertyGridCtrl and override the AdjustLayout method to increase the size of the calculated m_nRowHeight value. I also needed to implement a class derived from CMFCPropertyGridProperty to provide access to the HasButton protected member variable. All told, about 130 lines of code to support an IPv4 address control.
- The "Your Shoe Size" property in my code is supported via implementing a custom class derived from CMFCPropertyGridProperty. In the NewControls sample, this corresponds most closely to the class called "CCustomDlgProp"
- The "Your Shoe Size (Combo)" property in my code can be implementing with a custom class derived from CMFCPropertyGridProperty. I was able to take the class called "CTwoButtonsProp" in the "NewControls" sample and modify it to show the standard drop down button and "…" edit bottom at the same time. The drop down button then showed the combo box values while the edit button brought up a custom editor. This was all achieved using just c. 50 lines of code.
- The "Multi line edit control" property in my code can be implemented using a custom class derived from CMFCPropertyGridProperty.
- This new built in MFC control class supports a number of additional features such as skinning, masked edit values, embedded slider and ComboBoEx classes, icon lists, a description bar and many other features, which now makes my implementation obsolete.
Categories: Web Site Updates
CListOptionsCtrl v1.24 (Obsolete)
February 28, 2016
Comments off
- Please note that I have discontinued development of this code and it is now considered obsolete. This is because as of Visual Studio 2008 with the MFC Feature Pack, there is a new GUI CMFCPropertyGridCtrl class which implements pretty much all the functionality of CListOptionsCtrl. I have reviewed the "NewControls" MFC sample which demonstrates CMFCPropertyGridCtrl as well as a lot of the other Feature Pack classes. With this new class, it is relatively easily to implement:
- The "Your First Name" sample property in my code is supported out of the box using the in place editor support of CMFCPropertyGridCtrl
- The "Day of the Week" and "Font Name combo" sample properties in my code are supported via the CMFCPropertyGridProperty::AddOption method
- The "Rating" sample property in my code is supported via the CMFCPropertyGridProperty::EnableSpinControl method
- The "File edit box" and "Folder edit box" properties in my code are supported via the CMFCPropertyGridFileProperty class
- The "Color selector" property in my code is supported via the CMFCPropertyGridColorProperty class
- The "Font Selector" property in my code is supported via the CMFCPropertyGridFontProperty class.
- The "Boolean combo" property in my code is supported via setting the value of a CMFCPropertyGridProperty property to a VT_BOOL.
- The "Your Shoe Size" property in my code is supported via implementing a custom class derived from CMFCPropertyGridProperty. In the NewControls sample, this corresponds most closely to the class called "CCustomDlgProp"
- The "Your Shoe Size (Combo)" property in my code can be implementing with a custom class derived from CMFCPropertyGridProperty. I was able to take the class called "CTwoButtonsProp" in the "NewControls" sample and modify it to show the standard drop down button and "…" edit button at the same time. The drop down button then showed the combo box values while the edit button brought up a custom editor. This was all achieved using just c. 50 lines of code.
- The "Date Example" and "Time Example" properties in my code can be implemented using a custom class derived from CMFCPropertyGridProperty. I was able to implement both of these using just c. 80 lines of code
- The "IP address Selector" property in my code requires a bit more code to implement than the date or time example as I needed to modify the CMFCPropertyGridCtrl::m_nRowHeight value to avoid clipping when the IP address in place control was drawn. To change the m_nRowHeight value I needed to implement a class derived from CMFCPropertyGridCtrl and override the AdjustLayout method to increase the size of the calculated m_nRowHeight value. I also needed to implement a class derived from CMFCPropertyGridProperty to provide access to the HasButton protected member variable. All told, about 130 lines of code to support an IPv4 address control.
- The final "Your First Name" sample property in my code is demonstrated by the ComboBoxEx property in the "NewControl" sample
- This new built in MFC control class supports a number of additional features such as disabled properties, skinning, masked edit values, embedded slider and ComboBoEx classes, icon lists, hierarchical data, a description bar and many other features, which now makes my implementation obsolete.
Categories: Web Site Updates
MfcCDDB v1.34
February 26, 2016
Comments off
Just to let everyone know that v1.34 of MfcCDDB has been released. Updates for this version include:
- Updated copyright details.
- Removed all the proxy connection methods as they cannot be easily supported / tested by the author.
- Updated the code to work with the latest version of the author’s CWSocket classes. The CWSocket class requires VC 2008 at a minimum to compile now and this is the earliest supported version of VC for the MfcCDDB classes now.
- Updated the code to clean compile on VC 2010 – VC 2015
- Reworked ParseRecordBodyFromFile method to use ATL::CHeapPtr class.
- Reworked the MapFromProtocolString & MapToProtocolString methods internal implementation.
- All the classes have been moved to a C++ namespace called "CDDB"
- Renamed the "CCDDB" class to "CClient".
- Removed the Read(const String& sDirectory…) method as this requires a full copy of the freedb database on the local file system and this is now approaching 1 GB in size as of Q1 2016.
- Removed the ParseRecordBodyFromFile method.
- Reworked the classes to optionally compile without MFC. By default the class now use STL classes and idioms but if you define CWSOCKET_MFC_EXTENSTIONS the class will revert back to the MFC behaviour.
- Added SAL annotations to all the code.
- Changed ordering of parameters in GetTrackPositionsUsingMCI, GetTrackPositionsUsingDeviceIoControl, ParseRecordBodyHelper, ParseSiteBodyHelper, ParseQueryBodyHelper & Sites methods.
- ParseRecordBodyHelper, ParseSiteBodyHelper, ParseQueryBodyHelper and ParseStatusBody now calls SetLastError with ERROR_INVALID_DATA if they detect parsing errors
Categories: Web Site Updates
CMapEx v1.01
February 21, 2016
Comments off
Just to let everyone know that v1.01 of CMapEx has been released. Updates for this version include:
- Updated copyright details.
- Updated the code to clean compile on VC 2010 – VC 2015
Categories: Web Site Updates
CSyncCollection v1.12
February 20, 2016
Comments off
Just to let everyone know that v1.12 of CSyncCollection has been released. Updates for this version include:
- Updated copyright details
- Updated the code to clean compile in VC 2015
- Added SAL annotations to all the code.
- Replaced all calls to assert with ATLASSERT.
- Code now uses ATL::CSemaphore instead of raw HANDLE’s for the semaphore member variables
- Code now uses ATL::CComCriticalSection instead of raw CRITICAL_SECTION for the critical section member variable
- Code now uses ATL::CEvent instead of raw HANDLE for the event member variable
- CSyncCollection::Create now returns a HRESULT instead of a BOOL
- The data is removed from the collection before the synchronization objects are destroyed in CSyncCollection::Close
- CSyncCollection::Lock and Unlock methods now return void instead of a BOOL
Categories: Web Site Updates
PerfCtrv2Mgr v1.02
February 10, 2016
Comments off
Just to let everyone know that v1.02 of PerfCtrv2Mgr has been released. Updates for this version include:
- Updated the code to use LoadLibrary rather than relying on client applications already having a implicit dependency on ADVAPI32.dll. This bug / issue was spotted when you compile the sample app in release mode which ships with the wrapper classes.
Categories: Web Site Updates