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

C / C++ / MFC

 
GeneralRe: IVariantDictionary HELL !!!! Pin
Christian Graus11-Dec-02 10:05
protectorChristian Graus11-Dec-02 10:05 
GeneralRe: IVariantDictionary HELL !!!! Pin
Stephane Rodriguez.11-Dec-02 10:16
Stephane Rodriguez.11-Dec-02 10:16 
GeneralRe: IVariantDictionary HELL !!!! Pin
Rene De La Garza11-Dec-02 3:37
Rene De La Garza11-Dec-02 3:37 
GeneralRe: IVariantDictionary HELL !!!! Pin
Daniel Turini11-Dec-02 4:32
Daniel Turini11-Dec-02 4:32 
GeneralScrolling in Listbox Pin
kubbazoob11-Dec-02 0:06
kubbazoob11-Dec-02 0:06 
GeneralRe: Scrolling in Listbox Pin
Joan M11-Dec-02 5:18
professionalJoan M11-Dec-02 5:18 
GeneralRe: Scrolling in Listbox Pin
Alvaro Mendez11-Dec-02 8:43
Alvaro Mendez11-Dec-02 8:43 
QuestionHow to remove a handle HFONT from memory? Pin
Daed11-Dec-02 0:00
Daed11-Dec-02 0:00 
I am using the following to get a handle for the font that I need to write with.

HFONT hNewFont = ::CreateFont(iHeight, 0, 0, 0, (IsBold? FW_BOLD: FW_NORMAL),
IsItalic, IsUnderline, IsStrikeOut, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, FontName);

My problem is that I have to delete the handle after using it to free the memory, but when I use DeleteObject(hNewFont) the font is not drawn correctly. How can I remove the font handle from the memory that will not affect my drawing.


Daed
AnswerRe: How to remove a handle HFONT from memory? Pin
Gert Boddaert11-Dec-02 0:25
Gert Boddaert11-Dec-02 0:25 
AnswerRe: How to remove a handle HFONT from memory? Pin
Ted Ferenc11-Dec-02 0:34
Ted Ferenc11-Dec-02 0:34 
AnswerRe: How to remove a handle HFONT from memory? Pin
Daed11-Dec-02 2:58
Daed11-Dec-02 2:58 
GeneralRe: How to remove a handle HFONT from memory? Pin
Ted Ferenc11-Dec-02 5:11
Ted Ferenc11-Dec-02 5:11 
GeneralRe: How to remove a handle HFONT from memory? Pin
Ted Ferenc11-Dec-02 5:13
Ted Ferenc11-Dec-02 5:13 
GeneralRe: How to remove a handle HFONT from memory? Pin
Daed11-Dec-02 6:04
Daed11-Dec-02 6:04 
GeneralRe: How to remove a handle HFONT from memory? Pin
Ted Ferenc11-Dec-02 6:27
Ted Ferenc11-Dec-02 6:27 
GeneralProfiling Tools Pin
Steve Thresher11-Dec-02 0:00
Steve Thresher11-Dec-02 0:00 
GeneralRe: Profiling Tools Pin
Andreas Saurwein11-Dec-02 2:09
Andreas Saurwein11-Dec-02 2:09 
GeneralSocket Program Problem!!! Pin
John Bosko10-Dec-02 23:10
John Bosko10-Dec-02 23:10 
GeneralRe: Socket Program Problem!!! Pin
jhwurmbach10-Dec-02 23:42
jhwurmbach10-Dec-02 23:42 
GeneralRe: Socket Program Problem!!! Pin
John Bosko10-Dec-02 23:44
John Bosko10-Dec-02 23:44 
GeneralRe: Socket Program Problem!!! Pin
jhwurmbach10-Dec-02 23:54
jhwurmbach10-Dec-02 23:54 
GeneralRe: Socket Program Problem!!! Pin
John Bosko11-Dec-02 19:06
John Bosko11-Dec-02 19:06 
GeneralRe: Socket Program Problem!!! Pin
Rage11-Dec-02 0:06
professionalRage11-Dec-02 0:06 
GeneralRe: Socket Program Problem!!! Pin
Rage10-Dec-02 23:58
professionalRage10-Dec-02 23:58 
GeneralRe: Socket Program Problem!!! Pin
John Bosko11-Dec-02 0:00
John Bosko11-Dec-02 0:00 

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.