Click here to Skip to main content
15,907,492 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionVSS2005 sync problem Pin
followait3-Oct-08 14:38
followait3-Oct-08 14:38 
QuestionWindows system startup applications... Pin
TURK3-Oct-08 11:33
TURK3-Oct-08 11:33 
QuestionRe: Windows system startup applications... Pin
David Crow3-Oct-08 14:53
David Crow3-Oct-08 14:53 
AnswerRe: Windows system startup applications... Pin
cofi++5-Oct-08 7:46
cofi++5-Oct-08 7:46 
GeneralRe: Windows system startup applications... Pin
TURK16-Jul-09 14:44
TURK16-Jul-09 14:44 
QuestionCFontDialog font size - Need Help!!!!! Pin
Lonnie Johnson3-Oct-08 10:46
Lonnie Johnson3-Oct-08 10:46 
QuestionRe: CFontDialog font size - Need Help!!!!! Pin
CPallini3-Oct-08 12:14
mveCPallini3-Oct-08 12:14 
AnswerRe: CFontDialog font size - Need Help!!!!! Pin
Lonnie Johnson6-Oct-08 8:43
Lonnie Johnson6-Oct-08 8:43 
I have found the answer.
lfHeight must be converted from print units to screen units because the CFontDialog class uses screen units. Here is the updated code:

ASSERT(pDC->GetMapMode() == MM_TEXT); 
LOGFONT  lf;
::ZeroMemory(&lf, sizeof(LOGFONT));
int nPrintDpi = pDC->GetDeviceCaps(LOGPIXELSY);
lf.lfHeight = -MulDiv(10, pDC->GetDeviceCaps(LOGPIXELSY), 72);

// Convert lfHeight from print units to screen units
// because the CFontDialog class uses Screen units
HDC hDC = GetDC(m_pView->m_hWnd);
int nScreenDpi = GetDeviceCaps(hDC, LOGPIXELSY);
lf.lfHeight = MulDiv(lf.lfHeight, nScreenDpi, nPrintDpi);

lstrcpy(lf.lfFaceName, _T("Arial"));    
CFontDialog dlg(&lf, CF_PRINTERFONTS, pDC);
if (dlg.DoModal() == IDOK)
{    
     m_strFont = dlg.GetFaceName();    
     m_nPointSize = dlg.GetSize() / 10;
}

QuestionGUI Pin
Sarriss3-Oct-08 3:59
Sarriss3-Oct-08 3:59 
AnswerRe: GUI Pin
Mark Salsbery3-Oct-08 4:47
Mark Salsbery3-Oct-08 4:47 
GeneralRe: GUI Pin
Sarriss3-Oct-08 4:53
Sarriss3-Oct-08 4:53 
GeneralRe: GUI Pin
led mike3-Oct-08 5:59
led mike3-Oct-08 5:59 
GeneralRe: GUI Pin
Mark Salsbery3-Oct-08 6:12
Mark Salsbery3-Oct-08 6:12 
GeneralRe: GUI Pin
Sarriss3-Oct-08 6:33
Sarriss3-Oct-08 6:33 
GeneralRe: GUI Pin
Mark Salsbery3-Oct-08 6:57
Mark Salsbery3-Oct-08 6:57 
QuestionFailed to retrieve process arguments in 64 bit Windows Pin
Jack Rong3-Oct-08 3:59
Jack Rong3-Oct-08 3:59 
QuestionHow to get windows driver kit Pin
Deepu Antony3-Oct-08 3:05
Deepu Antony3-Oct-08 3:05 
AnswerRe: How to get windows driver kit Pin
Matthew Faithfull3-Oct-08 3:11
Matthew Faithfull3-Oct-08 3:11 
GeneralRe: How to get windows driver kit Pin
Deepu Antony3-Oct-08 3:26
Deepu Antony3-Oct-08 3:26 
AnswerRe: How to get windows driver kit Pin
Matthew Faithfull3-Oct-08 3:31
Matthew Faithfull3-Oct-08 3:31 
GeneralRe: How to get windows driver kit Pin
Deepu Antony3-Oct-08 3:39
Deepu Antony3-Oct-08 3:39 
GeneralRe: How to get windows driver kit Pin
Matthew Faithfull3-Oct-08 3:47
Matthew Faithfull3-Oct-08 3:47 
GeneralRe: How to get windows driver kit Pin
Deepu Antony3-Oct-08 3:54
Deepu Antony3-Oct-08 3:54 
AnswerRe: How to get windows driver kit Pin
Saurabh.Garg3-Oct-08 18:23
Saurabh.Garg3-Oct-08 18:23 
GeneralRe: How to get windows driver kit Pin
cofi++4-Oct-08 9:08
cofi++4-Oct-08 9:08 

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.