Monday, September 1, 2014

Windows App - INI File Parser

CIniParser is class written in C++. It can be used to parse INI files, as well as other files with the same format.

It reads sections, parameters, values and comments for each parameter.

Demo application can be downloaded here. It first reads and shows lines one by one, and then shows how actual parsing looks like, with parameters, values and comments shown.




Monday, July 21, 2014

C++ - Custom Tooltip

Custom tool tip C++ class implements multiline and multicolor tool tip, which can be used to present different information, in several lines, using various colors:


CPP and H file can be reviewed and downloaded from following locations: source and header. The class is MFC dependent. Use of the class is simple:




void CCustomChartControl::OnMouseMove(UINT nFlags, CPoint point)
{
  COLORREF color1, color2, color3;
  CString strText1(_T("")), strText2(_T("")), strText3(_T(""));

  // initialize colors and texts
  // ...

  if (m_pWndToolTip == NULL)
  {
     m_pWndToolTip = new CCustomToolTip();
   
     if (!m_pWndToolTip->Create(this))
     {
         TRACE(_T("Couldn't create tool tip window!"));    
     }
     else
     {
         m_pWndToolTip->ShowToolTip(TRUE);
     }
  }

  if (m_pWndToolTip != NULL)
  {        
     m_pWndToolTip->UpdateText(strText1, strText2, strText3,
         true, true, true,
         true, true, true,
         color1, color2, color3,
         point);   
  }
}
In method CCustomToolTip::UpdateText you can set texts with three different colors and visibility types (visible/not visible).

Thursday, June 19, 2014

Android App - Zoromatic Flashlight

Zoromatic Flashlight for Android is simple application, which uses device's camera flash, to provide flashlight at any time. It also provides additional strobe feature, with frequencies from 0 to 20 Hz.



Application can be downloaded from following location: https://play.google.com/store/apps/details?id=com.zoromatic.flashlight.