Symvol Community Edition Released 

Symvol Community Edition has been released.
[ add comment ] permalink
DVD Backups 

DVDFab is a suitable replacement to the old faithful DVD Shrink.
[ add comment ] permalink related link
MFC Tooltips 

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
JSON over HTTP POST 

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
Résumés 

I've updated my résumés to be current.
[ add comment ] permalink

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next> Last>>