Click here to Skip to main content
15,908,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionFont problem Pin
trioum12-Dec-08 0:53
trioum12-Dec-08 0:53 
I am using the following code to choose the font from font dialog box . now after popup the font dialog box ,I select the font type size color and other properties .Now after clicking the ok button ,I want to display the all information in different comboboxes . my query is how can I get this information out from the font dialog box . I used the following code .

CHOOSEFONT cf; // common dialog box structure
static LOGFONT lf; // logical font structure
static DWORD rgbCurrent; // current text color
HFONT hfont, hfontPrev;
DWORD rgbPrev;

//Initialize CHOOSEFONT
ZeroMemory(&cf, sizeof(CHOOSEFONT));
cf.lStructSize = sizeof (CHOOSEFONT);
cf.hwndOwner = hdWnd;
cf.lpLogFont = &lf;
cf.rgbColors = rgbCurrent;
cf.Flags = CF_SCREENFONTS | CF_EFFECTS;

if (ChooseFont(&cf)==TRUE) {
hfont = CreateFontIndirect(cf.lpLogFont);

Trioum

QuestionRe: Font problem Pin
CPallini12-Dec-08 0:58
mveCPallini12-Dec-08 0:58 
AnswerRe: Font problem Pin
trioum12-Dec-08 1:17
trioum12-Dec-08 1:17 
GeneralRe: Font problem Pin
CPallini12-Dec-08 1:49
mveCPallini12-Dec-08 1:49 
GeneralRe: Font problem Pin
trioum14-Dec-08 18:04
trioum14-Dec-08 18:04 
GeneralRe: Font problem Pin
trioum14-Dec-08 18:26
trioum14-Dec-08 18:26 
GeneralRe: Font problem Pin
Hans Dietrich15-Dec-08 6:23
mentorHans Dietrich15-Dec-08 6:23 
QuestionProgress bar ctrl question Pin
josip cagalj12-Dec-08 0:50
josip cagalj12-Dec-08 0:50 
AnswerRe: Progress bar ctrl question Pin
Iain Clarke, Warrior Programmer12-Dec-08 2:50
Iain Clarke, Warrior Programmer12-Dec-08 2:50 
GeneralRe: Progress bar ctrl question Pin
josip cagalj12-Dec-08 3:23
josip cagalj12-Dec-08 3:23 
GeneralRe: Progress bar ctrl question Pin
Iain Clarke, Warrior Programmer12-Dec-08 3:35
Iain Clarke, Warrior Programmer12-Dec-08 3:35 
GeneralRe: Progress bar ctrl question Pin
josip cagalj12-Dec-08 3:42
josip cagalj12-Dec-08 3:42 
GeneralRe: Progress bar ctrl question Pin
josip cagalj14-Dec-08 23:04
josip cagalj14-Dec-08 23:04 
QuestionGet a HBITMAP from a BITMAP structure. Pin
VC++Maniac12-Dec-08 0:24
VC++Maniac12-Dec-08 0:24 
AnswerRe: Get a HBITMAP from a BITMAP structure. Pin
Nishad S12-Dec-08 1:38
Nishad S12-Dec-08 1:38 
GeneralRe: Get a HBITMAP from a BITMAP structure. Pin
VC++Maniac12-Dec-08 1:39
VC++Maniac12-Dec-08 1:39 
GeneralRe: Get a HBITMAP from a BITMAP structure. Pin
Nishad S12-Dec-08 1:44
Nishad S12-Dec-08 1:44 
QuestionCom is not opening correctly, is any dll missing? Pin
shir_k12-Dec-08 0:11
shir_k12-Dec-08 0:11 
QuestionRe: Com is not opening correctly, is any dll missing? Pin
CPallini12-Dec-08 0:14
mveCPallini12-Dec-08 0:14 
AnswerRe: Com is not opening correctly, is any dll missing? Pin
shir_k12-Dec-08 1:27
shir_k12-Dec-08 1:27 
GeneralRe: Com is not opening correctly, is any dll missing? Pin
CPallini12-Dec-08 1:43
mveCPallini12-Dec-08 1:43 
QuestionError 10038 , at receive on serbver side Pin
singh_nav11-Dec-08 23:32
singh_nav11-Dec-08 23:32 
AnswerRe: Error 10038 , at receive on serbver side Pin
Code-o-mat12-Dec-08 1:48
Code-o-mat12-Dec-08 1:48 
QuestionShell Extension to Change the File Type Text Pin
Steve Thresher11-Dec-08 22:39
Steve Thresher11-Dec-08 22:39 
QuestionDatatype parser for C++ [modified] Pin
Nishad S11-Dec-08 22:25
Nishad S11-Dec-08 22:25 

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.