void CMyTrre::OnCustomDraw(NMHDR *pNMHDR, LRESULT *pResult) { LPNMTVCUSTOMDRAW pCustomDraw = reinterpret_cast<LPNMTVCUSTOMDRAW>(pNMHDR); *pResult = 0; NMTVCUSTOMDRAW *pcd = (NMTVCUSTOMDRAW *)pNMHDR; switch (pcd->nmcd.dwDrawStage) { case CDDS_PREPAINT: *pResult = CDRF_NOTIFYITEMDRAW; break; case CDDS_ITEMPOSTPAINT: { HTREEITEM hItem = (HTREEITEM)pcd->nmcd.dwItemSpec; CString giorno; giorno = GetItemText(hItem);//ottengo il mese o giorno int n_pos; n_pos = giorno.Find(_T("a")); if (n_pos >= 0) { //Rectangle(pcd->nmcd.hdc, pcd->nmcd.rc.left, pcd->nmcd.rc.top, pcd->nmcd.rc.right, pcd->nmcd.rc.bottom); pcd->nmcd.rc.right = pcd->nmcd.rc.right + 30; // pcd->nmcd.rc.bottom = pcd->nmcd.rc.bottom + 20; pcd->nmcd.rc.top = pcd->nmcd.rc.top + 23; DrawText(pcd->nmcd.hdc, _T("10:31pm"), 7, &pcd->nmcd.rc, DT_CENTER); } *pResult = CDRF_DODEFAULT;// do not set *pResult = CDRF_SKIPDEFAULT break; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)