Click here to Skip to main content
15,902,189 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCFileDialog Pin
Tenacious28-Jun-00 22:47
Tenacious28-Jun-00 22:47 
GeneralRe: CFileDialog Pin
cmulcay28-Jun-00 23:18
cmulcay28-Jun-00 23:18 
Questionhow to set the font used for button/label Pin
mactan28-Jun-00 22:28
sussmactan28-Jun-00 22:28 
AnswerRe: how to set the font used for button/label Pin
Mike Dunn29-Jun-00 0:38
Mike Dunn29-Jun-00 0:38 
Here's an example that makes the font bold. This is untested, and it's 3:25 AM, so please test before checking the code in. Wink | ;)
HFONT hCurrFont, hNewFont;
LOGFONT lf;

// 1. Get the button's current font.
hCurrFont = (HFONT) SendDlgItemMessage ( hMyDlg, IDC_MY_BUTTON, WM_GETFONT, 0, 0 );
GetObject ( hCurrFont, sizeof(LOGFONT), &lf );

// 2. Change the font however you want by tweaking the LOGFONT members.
lf.lfWeight = FW_BOLD;

// 3. Create a new font.  Note that in "real" code, you should save this HFONT somewhere and delete the font when the dialog closes.
hNewFont = CreateFontIndirect ( &lf );

// 4. Make the button use this new font.
SendDlgItemMessage ( hMyDlg, IDC_MY_BUTTON, WM_SETFONT, (WPARAM) hNewFont, TRUE );

Questionhow to set the font used for button/label Pin
mactan28-Jun-00 22:28
sussmactan28-Jun-00 22:28 
GeneralWindows Firewalls Pin
FunkBoy28-Jun-00 21:20
sussFunkBoy28-Jun-00 21:20 
QuestionHow to read cpu temperature? Pin
Farzad B.28-Jun-00 20:41
sussFarzad B.28-Jun-00 20:41 
GeneralWhen a DLL unload from physical memory?? Pin
Ryan Park2-Jul-00 23:56
Ryan Park2-Jul-00 23:56 
GeneralRe: When a DLL unload from physical memory?? Pin
Pere Mitjavila15-Jul-00 0:50
Pere Mitjavila15-Jul-00 0:50 
General_AfxGetComCtlVersion Pin
28-Jun-00 9:19
suss28-Jun-00 9:19 
GeneralRe: _AfxGetComCtlVersion Pin
Mike Dunn29-Jun-00 0:27
Mike Dunn29-Jun-00 0:27 
GeneralInterface Pin
WinJr28-Jun-00 7:00
sussWinJr28-Jun-00 7:00 
GeneralRe: Interface Pin
Mike Dunn28-Jun-00 8:33
Mike Dunn28-Jun-00 8:33 
QuestionHow to get the domain name Pin
Member 135628-Jun-00 6:15
Member 135628-Jun-00 6:15 
AnswerRe: How to get the domain name Pin
Sam Hobbs29-Jun-00 18:30
Sam Hobbs29-Jun-00 18:30 
GeneralAdding an menuitem runtime Pin
KNEI28-Jun-00 6:13
sussKNEI28-Jun-00 6:13 
QuestionHow to view the files from a zip files Pin
Member 316528-Jun-00 4:50
Member 316528-Jun-00 4:50 
AnswerRe: How to view the files from a zip files Pin
Blake Miller28-Jun-00 7:09
Blake Miller28-Jun-00 7:09 
GeneralLNK2001 in MFC Extension DLL's Pin
Hans-Peter Warter28-Jun-00 2:43
Hans-Peter Warter28-Jun-00 2:43 
GeneralRe: LNK2001 in MFC Extension DLL's Pin
GBO28-Jun-00 4:47
GBO28-Jun-00 4:47 
GeneralCWnd and scrolling... Pin
Member 91827-Jun-00 15:49
Member 91827-Jun-00 15:49 
GeneralQUEST: #define classoffset(base, derived) ((DWORD)(static_cast<base*>((derived*)8))-8) Pin
cuong cao27-Jun-00 15:21
cuong cao27-Jun-00 15:21 
GeneralSetCommBreak Pin
Barry Zhao27-Jun-00 10:47
Barry Zhao27-Jun-00 10:47 
GeneralRe: SetCommBreak Pin
Alex Gorev27-Jun-00 11:56
Alex Gorev27-Jun-00 11:56 
GeneralChanging the selection color of a CRichEditView Pin
JCpp27-Jun-00 8:46
JCpp27-Jun-00 8:46 

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.