Click here to Skip to main content
15,920,468 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to crate new frame Pin
Anonymous8-Feb-05 18:41
Anonymous8-Feb-05 18:41 
GeneralInvoke the constructor Pin
Gurra_Koo7-Feb-05 7:53
Gurra_Koo7-Feb-05 7:53 
GeneralRe: Invoke the constructor Pin
Joaquín M López Muñoz7-Feb-05 8:21
Joaquín M López Muñoz7-Feb-05 8:21 
GeneralRe: Invoke the constructor Pin
Gurra_Koo7-Feb-05 8:53
Gurra_Koo7-Feb-05 8:53 
GeneralCfileDlg Pin
elfokab7-Feb-05 5:49
elfokab7-Feb-05 5:49 
GeneralRe: CfileDlg Pin
ThatsAlok7-Feb-05 6:51
ThatsAlok7-Feb-05 6:51 
GeneralRe: CfileDlg Pin
Michael Dunn7-Feb-05 6:54
sitebuilderMichael Dunn7-Feb-05 6:54 
QuestionFonts for CTreeCtrl. What is not right now? Pin
bilas7-Feb-05 5:42
bilas7-Feb-05 5:42 
I want to set specific font for my tree, so I use CUSTOMDRAW event. I've write two functions that must set my own font, but they do not workD'Oh! | :doh:
Please, help me. What is incorrect in my functions?
<br />
<br />
void CMyTree::OnNMCustomdraw(NMHDR *pNMHDR, LRESULT *pResult)<br />
{<br />
        LPNMTVCUSTOMDRAW pNMTVCD = (LPNMTVCUSTOMDRAW) pNMHDR;<br />
        HWND hWndTreeView = pNMHDR->hwndFrom;<br />
        if (pNMHDR->code == NM_CUSTOMDRAW)<br />
              *pResult = handleCustomDraw(hWndTreeView, pNMTVCD);<br />
<br />
    *pResult = handleCustomDraw(hWndTreeView, pNMTVCD);<br />
    //*pResult = 0;<br />
}<br />
<br />
<br />
long CMyTree::handleCustomDraw(HWND hWndTreeView, LPNMTVCUSTOMDRAW pNMTVCD)<br />
{<br />
        if (pNMTVCD==NULL)<br />
        {<br />
            return -1;<br />
	}<br />
        switch (pNMTVCD->nmcd.dwDrawStage)<br />
        { <br />
                case CDDS_PREPAINT:<br />
                {<br />
                     return (CDRF_NOTIFYPOSTPAINT | CDRF_NOTIFYITEMDRAW);<br />
		}<br />
                case CDDS_ITEMPREPAINT:<br />
                {<br />
                        LOGFONT lf;<br />
                        lf.lfHeight = 20;<br />
                        lstrcpy(lf.lfFaceName, "Time New Roman");<br />
                        lf.lfWeight = FW_HEAVY;<br />
                        lf.lfItalic = TRUE;<br />
                        HFONT gh = CreateFontIndirect(&lf);;<br />
                        SelectObject(pNMTVCD->nmcd.hdc, &gh);<br />
                        return (CDRF_NOTIFYPOSTPAINT | CDRF_NEWFONT);<br />
                }<br />
                case CDDS_ITEMPOSTPAINT:<br />
                {<br />
                        LOGFONT lf;<br />
                        lf.lfHeight = 20;<br />
                        lf.lfItalic = TRUE;<br />
                        lstrcpy(lf.lfFaceName, "Time New Roman");<br />
                        lf.lfWeight = FW_HEAVY;<br />
                        HFONT gh = CreateFontIndirect(&lf);;<br />
                        SelectObject(pNMTVCD->nmcd.hdc, &gh);<br />
                        return CDRF_DODEFAULT;<br />
			//return (CDRF_NOTIFYPOSTPAINT | CDRF_NEWFONT);<br />
                }		}<br />
<br />
        }<br />
        return 0;<br />
}<br />
<br />

Thank to everybody very much in advance..
AnswerRe: Fonts for CTreeCtrl. What is not right now? Pin
Michael Dunn7-Feb-05 6:56
sitebuilderMichael Dunn7-Feb-05 6:56 
GeneralRe: Fonts for CTreeCtrl. What is not right now? Pin
bilas7-Feb-05 7:31
bilas7-Feb-05 7:31 
GeneralVS 7.1 C++ and code profiling tools [modified] Pin
Antony M Kancidrowski7-Feb-05 5:15
Antony M Kancidrowski7-Feb-05 5:15 
GeneralRe: VS 7.1 C++ and code profiling tools [modified] Pin
Neville Franks7-Feb-05 8:58
Neville Franks7-Feb-05 8:58 
GeneralRe: VS 7.1 C++ and code profiling tools [modified] Pin
Antony M Kancidrowski7-Feb-05 11:53
Antony M Kancidrowski7-Feb-05 11:53 
QuestionHow to delete a handle return by Microsoft function? Pin
mk_le7-Feb-05 4:10
mk_le7-Feb-05 4:10 
AnswerRe: How to delete a handle return by Microsoft function? Pin
Maximilien7-Feb-05 4:41
Maximilien7-Feb-05 4:41 
AnswerRe: How to delete a handle return by Microsoft function? Pin
2249177-Feb-05 21:41
2249177-Feb-05 21:41 
GeneralRe: How to delete a handle return by Microsoft function? Pin
mk_le9-Feb-05 2:16
mk_le9-Feb-05 2:16 
GeneralComposite Control Pin
Liger_Zero_X7-Feb-05 3:58
Liger_Zero_X7-Feb-05 3:58 
GeneralRe: Composite Control Pin
Liger_Zero_X7-Feb-05 5:55
Liger_Zero_X7-Feb-05 5:55 
GeneralActive X Pin
racing577-Feb-05 3:36
racing577-Feb-05 3:36 
GeneralNM_CUSTOMBAR returns void, how to use it correctly Pin
bilas7-Feb-05 2:30
bilas7-Feb-05 2:30 
GeneralRe: NM_CUSTOMBAR returns void, how to use it correctly Pin
Michael Dunn7-Feb-05 6:58
sitebuilderMichael Dunn7-Feb-05 6:58 
GeneralShared Folder Access Pin
ashtwin7-Feb-05 2:14
ashtwin7-Feb-05 2:14 
GeneralRe: Shared Folder Access Pin
Antony M Kancidrowski7-Feb-05 2:33
Antony M Kancidrowski7-Feb-05 2:33 
GeneralRe: Shared Folder Access Pin
Rick Crone9-Feb-05 10:58
Rick Crone9-Feb-05 10:58 

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.