Invalid handle - font problem??
Posted on 2007-04-04
I just added some new code to a program that I've been using a CDC object with for printing... I didn't modify any code that touches printing but when printing I'm now getting a "first-chance exception in MyProgram.exe (NTDLL.DLL): 0xC0000008: Invalid Handle." I've found how to get around the problem (sort of).. it has something to do with fonts. I had the following line:
m_FieldInfoFont.CreateFont(FIELD_INFO_SIZE*nMapFactor, 0, 0, 0, FW_BOLD, FALSE, bUnderLineFieldInfo, FALSE, ANSI_CHARSET, OUT_TT_PRECIS, CLIP_TT_ALWAYS, DEFAULT_QUALITY, DEFAULT_PITCH, "Arial"); //"Times New Roman");
The font change to Arial from times new roman took away the invalid handle issue.... What could be causing this?
Thank you very much!