Click here to Skip to main content
15,897,704 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Background color of CListCtrl Pin
Tomasz Sowinski27-Jul-01 4:39
Tomasz Sowinski27-Jul-01 4:39 
GeneralRe: Background color of CListCtrl Pin
skfnmuislædmufaæoi29-Jul-01 2:38
skfnmuislædmufaæoi29-Jul-01 2:38 
GeneralRe: Background color of CListCtrl Pin
Tomasz Sowinski29-Jul-01 23:12
Tomasz Sowinski29-Jul-01 23:12 
QuestionHow to gradation with RGBcolor? Pin
jin sok cho27-Jul-01 4:01
jin sok cho27-Jul-01 4:01 
AnswerRe: How to gradation with RGBcolor? Pin
mr200327-Jul-01 4:46
mr200327-Jul-01 4:46 
GeneralRe: How to gradation with RGBcolor? Pin
Not Active27-Jul-01 8:26
mentorNot Active27-Jul-01 8:26 
GeneralRe: How to gradation with RGBcolor? Pin
jin sok cho27-Jul-01 18:21
jin sok cho27-Jul-01 18:21 
QuestionFont Height in Dialogs? Pin
Derek Lakin27-Jul-01 3:19
Derek Lakin27-Jul-01 3:19 
The Windows GDI Platform SDK documentation for LOGFONT in MSDN states that the following can be used to set the font size in points when using the MM_TEXT mapping mode:
lfHeight = -MulDiv (PointSize, GetDeviceCaps (hDC, LOGPIXELSY), 72);

I've used this code to try to set the font height but it is unchanged at about 10/12 points height. Any ideas? My code is as follows:
BOOL CMyDialog::OnInitDialog () {
    CDialog::OnInitDialog ();

    GetFont ()->GetLogFont (&m_lf);
    CDC* pDC = GetDC ();
    m_lf.lfWeight = FW_BOLD;
    m_lf.lfHeight = -MulDiv (8, GetDeviceCaps (pDC->hDC, LOGPIXELSY), 72);
    CFont font;
    font.CreateFontIndirect (&m_lf);

    CWnd* pWnd = GetWindow (GW_CHILD);
    while (pWnd != NULL) {
        pWnd->SetFont (&font);
        pWnd = pWnd->GetWindow (GW_HWNDNEXT);
    }
    return TRUE;
}


Derek.
AnswerRe: Font Height in Dialogs? Pin
Tomasz Sowinski27-Jul-01 4:37
Tomasz Sowinski27-Jul-01 4:37 
GeneralRe: Font Height in Dialogs? Pin
Derek Lakin27-Jul-01 5:06
Derek Lakin27-Jul-01 5:06 
AnswerRe: Font Height in Dialogs? Pin
27-Jul-01 7:19
suss27-Jul-01 7:19 
GeneralGetting\Setting NUM LOCK key state Pin
s_k27-Jul-01 2:39
s_k27-Jul-01 2:39 
GeneralRe: Getting\Setting NUM LOCK key state Pin
Not Active27-Jul-01 8:32
mentorNot Active27-Jul-01 8:32 
GeneralWM_KICKIDLE Pin
Derek Lakin27-Jul-01 0:14
Derek Lakin27-Jul-01 0:14 
GeneralRe: WM_KICKIDLE Pin
Christian Graus27-Jul-01 1:06
protectorChristian Graus27-Jul-01 1:06 
GeneralRe: WM_KICKIDLE Pin
Derek Lakin27-Jul-01 3:11
Derek Lakin27-Jul-01 3:11 
GeneralRe: WM_KICKIDLE Pin
Neville Franks27-Jul-01 3:26
Neville Franks27-Jul-01 3:26 
GeneralRe: WM_KICKIDLE Pin
Derek Lakin27-Jul-01 5:05
Derek Lakin27-Jul-01 5:05 
GeneralStill Not Working :( Pin
Derek Lakin30-Jul-01 1:14
Derek Lakin30-Jul-01 1:14 
GeneralRe: Still Not Working :( Pin
Neville Franks30-Jul-01 1:43
Neville Franks30-Jul-01 1:43 
GeneralRe: Not Doc/View Pin
Derek Lakin30-Jul-01 8:35
Derek Lakin30-Jul-01 8:35 
GeneralRe: Not Doc/View Pin
Tomasz Sowinski30-Jul-01 8:49
Tomasz Sowinski30-Jul-01 8:49 
Generalhelp! message handling in general Pin
27-Jul-01 10:45
suss27-Jul-01 10:45 
GeneralRe: help! message handling in general Pin
Neville Franks27-Jul-01 12:40
Neville Franks27-Jul-01 12:40 
GeneralRe: help! message handling in general Pin
august27-Jul-01 13:04
august27-Jul-01 13:04 

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.