Symvol Community Edition Released
Monday, February 6, 2012, 09:23 PM
Uformia
[ add comment ] permalink
Tuesday, December 20, 2011, 11:40 PM
Misc
DVDFab is a suitable replacement to the old faithful DVD Shrink.
[ add comment ] permalink related link
Friday, December 16, 2011, 08:21 PM
Uformia
Today I worked on adding custom tooltips for a CSliderCtrl. The CSliderCtrl was an alternative interface to using a drop-down combo box, and the tooltips had to show what option was currently associated. Attempting to do this from the parent window via WM_NOTIFY didn't work, but the following example did:
Add a class (like CMySliderCtrl), derived from CSliderCtrl.
Add and implement the following:
BEGIN_MESSAGE_MAP(CMySliderCtrl, CSliderCtrl)
ON_NOTIFY_EX(TTN_NEEDTEXTW, 0, OnToolTipNotify)
ON_NOTIFY_EX(TTN_NEEDTEXTA, 0, OnToolTipNotify)
END_MESSAGE_MAP()
BOOL CMySliderCtrl::OnToolTipNotify(UINT id, NMHDR *pNMHDR, LRESULT *pResult)
{
BOOL bResult = TRUE;
// need to handle both ANSI and UNICODE versions of the message
TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR;
TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR;
// CString m_strTipText = _T("anything you like!");
// in this case m_strTipText is a member filled by the window that owns the slider
if (pNMHDR->code == TTN_NEEDTEXTA)
{
lstrcpyn(pTTTA->szText, m_strTipText, sizeof(pTTTA->szText));
pTTTA->hinst = NULL;
}
else if (pNMHDR->code == TTN_NEEDTEXTW)
{
_mbstowcsz(pTTTW->szText, m_strTipText, sizeof(pTTTW->szText));
pTTTW->hinst = NULL;
}
*pResult = 0;
return bResult;
}
[ add comment ] permalink
Thursday, October 6, 2011, 02:18 PM
Misc
http://urldecode.org converts the URL-Encoded POST data to readable text.
http://archive.dojotoolkit.org/nightly/ ... utify.html prettyfies the JSON into tabbed layout.
[ add comment ] permalink
Monday, September 12, 2011, 06:34 PM
Misc
I've updated my résumés to be current.
[ add comment ] permalink