Click here to Skip to main content
15,919,358 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ Program to decompress a compressed string Pin
Randor 18-Aug-19 23:17
professional Randor 18-Aug-19 23:17 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20018-Aug-19 23:27
antoniu20018-Aug-19 23:27 
GeneralRe: C++ Program to decompress a compressed string Pin
Randor 18-Aug-19 23:42
professional Randor 18-Aug-19 23:42 
AnswerRe: C++ Program to decompress a compressed string Pin
antoniu20019-Aug-19 0:00
antoniu20019-Aug-19 0:00 
GeneralRe: C++ Program to decompress a compressed string Pin
Randor 19-Aug-19 0:20
professional Randor 19-Aug-19 0:20 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20021-Aug-19 1:13
antoniu20021-Aug-19 1:13 
GeneralRe: C++ Program to decompress a compressed string Pin
Randor 21-Aug-19 7:22
professional Randor 21-Aug-19 7:22 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20021-Aug-19 7:31
antoniu20021-Aug-19 7:31 
GeneralRe: C++ Program to decompress a compressed string Pin
Randor 21-Aug-19 9:08
professional Randor 21-Aug-19 9:08 
GeneralRe: C++ Program to decompress a compressed string Pin
k505421-Aug-19 12:00
mvek505421-Aug-19 12:00 
AnswerRe: C++ Program to decompress a compressed string Pin
Stefan_Lang20-Aug-19 23:25
Stefan_Lang20-Aug-19 23:25 
QuestionIs there a conventional name for accessing e.g. memories with fewer address bits than required, using range a selector? Pin
arnold_w12-Aug-19 4:56
arnold_w12-Aug-19 4:56 
AnswerRe: Is there a conventional name for accessing e.g. memories with fewer address bits than required, using range a selector? Pin
OriginalGriff12-Aug-19 5:03
mveOriginalGriff12-Aug-19 5:03 
GeneralRe: Is there a conventional name for accessing e.g. memories with fewer address bits than required, using range a selector? Pin
Stefan_Lang12-Aug-19 22:22
Stefan_Lang12-Aug-19 22:22 
AnswerRe: Is there a conventional name for accessing e.g. memories with fewer address bits than required, using range a selector? Pin
leon de boer12-Aug-19 15:09
leon de boer12-Aug-19 15:09 
AnswerRe: Is there a conventional name for accessing e.g. memories with fewer address bits than required, using range a selector? Pin
arnold_w12-Aug-19 22:43
arnold_w12-Aug-19 22:43 
GeneralRe: Is there a conventional name for accessing e.g. memories with fewer address bits than required, using range a selector? Pin
Peter_in_278013-Aug-19 1:44
professionalPeter_in_278013-Aug-19 1:44 
GeneralRe: Is there a conventional name for accessing e.g. memories with fewer address bits than required, using range a selector? Pin
leon de boer13-Aug-19 5:55
leon de boer13-Aug-19 5:55 
Questionamibroker afl to dll Pin
kuleen10-Aug-19 20:37
kuleen10-Aug-19 20:37 
AnswerRe: amibroker afl to dll Pin
Victor Nijegorodov10-Aug-19 21:30
Victor Nijegorodov10-Aug-19 21:30 
AnswerRe: amibroker afl to dll Pin
Richard MacCutchan10-Aug-19 22:37
mveRichard MacCutchan10-Aug-19 22:37 
QuestionCTreeCtrl get individual item font ? Pin
Maximilien8-Aug-19 4:55
Maximilien8-Aug-19 4:55 
I'm setting a CTreeCtrl item item font to Italic by handling the NM_CUSTOMDRAW message and setting the font with SelectObject.

This is working.
C++
void MyTree::OnNMCustomdraw(NMHDR *pNMHDR, LRESULT *pResult)
{
    NMTVCUSTOMDRAW *itemToDraw = reinterpret_cast<NMTVCUSTOMDRAW*>>(pNMHDR);

    switch (itemToDraw->nmcd.dwDrawStage)
    {
    case CDDS_PREPAINT:
        *pResult = CDRF_NOTIFYITEMDRAW;
        return;
    case CDDS_ITEMPREPAINT:
    {
        HTREEITEM item = reinterpret_cast<HTREEITEM>(itemToDraw->nmcd.dwItemSpec);

        if (!m_IsItalicFontCreated) //Create once the italic font
        {
            CFont* currentFont = GetFont();
            LOGFONT logfont;
            currentFont->GetLogFont(&logfont);
            logfont.lfItalic = TRUE;
            m_ItalicFont.CreateFontIndirect(&logfont);
            m_IsItalicFontCreated = true;
        }

        if (m_IsItalicFontCreated)
        {
            ::SelectObject(itemToDraw->nmcd.hdc, m_ItalicFont);
            *pResult = CDRF_NEWFONT;
        }
    }
    return;
    }

    *pResult = 0;
}

But at some point I need to check an item current font; to see if a tree item is in italic.

The CTreeCtrl's item data (CTreeCtrl::SetItemData) is already used to hold data for each item.

Is it possible to do it ? I can't see in the documentation anything I can use.

There is a lItemlParam in the NMCUSTOMDRAW struct, I'm not certain if I could use this to some some simple data ? or even if it is persistent.

Any suggestions ?
Thanks.
I'd rather be phishing!

AnswerRe: CTreeCtrl get individual item font ? Pin
Victor Nijegorodov8-Aug-19 9:40
Victor Nijegorodov8-Aug-19 9:40 
GeneralRe: CTreeCtrl get individual item font ? Pin
Maximilien9-Aug-19 5:07
Maximilien9-Aug-19 5:07 
AnswerRe: CTreeCtrl get individual item font ? Pin
Victor Nijegorodov9-Aug-19 1:57
Victor Nijegorodov9-Aug-19 1:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.