Click here to Skip to main content
16,006,006 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralWM_SETFONT Pin
AlexO21-Jan-03 6:49
AlexO21-Jan-03 6:49 
GeneralRe: WM_SETFONT Pin
mickelthepickle21-Jan-03 6:52
mickelthepickle21-Jan-03 6:52 
GeneralRe: WM_SETFONT Pin
AlexO21-Jan-03 7:24
AlexO21-Jan-03 7:24 
GeneralRe: WM_SETFONT Pin
mickelthepickle21-Jan-03 9:35
mickelthepickle21-Jan-03 9:35 
GeneralRe: WM_SETFONT Pin
AlexO21-Jan-03 10:02
AlexO21-Jan-03 10:02 
GeneralRe: WM_SETFONT Pin
mickelthepickle21-Jan-03 10:12
mickelthepickle21-Jan-03 10:12 
GeneralRe: WM_SETFONT Pin
AlexO21-Jan-03 10:31
AlexO21-Jan-03 10:31 
GeneralRe: WM_SETFONT Pin
mickelthepickle22-Jan-03 3:37
mickelthepickle22-Jan-03 3:37 
BOOL CGdiObject::Attach(HGDIOBJ hObject)
{
ASSERT(m_hObject == NULL); // only attach once, detach on destroy
if (hObject == NULL)
return FALSE;
CHandleMap* pMap = afxMapHGDIOBJ(TRUE); // create map if not exist
ASSERT(pMap != NULL);
pMap->SetPermanent(m_hObject = hObject, this);
return TRUE;
}

It fails at ASSERT (m_hObject == NULL);

The Body of "CreateFont" looks like this...

return Attach(::CreateFont(nHeight, nWidth, nEscapement,
nOrientation, nWeight, bItalic, bUnderline, cStrikeOut,
nCharSet, nOutPrecision, nClipPrecision, nQuality,
nPitchAndFamily, lpszFacename));


When do you want me to try a font.Detach()? After each CreateFont call or after each SetFont call?
GeneralCalling .NET DLL Pin
Anonymous21-Jan-03 4:14
Anonymous21-Jan-03 4:14 
GeneralHanldes question - need experts opinion Pin
Yaron Nir21-Jan-03 3:56
Yaron Nir21-Jan-03 3:56 
GeneralRe: Hanldes question - need experts opinion Pin
Neville Franks21-Jan-03 4:01
Neville Franks21-Jan-03 4:01 
GeneralRe: Hanldes question - need experts opinion Pin
Yaron Nir21-Jan-03 4:09
Yaron Nir21-Jan-03 4:09 
GeneralRe: Hanldes question - need experts opinion Pin
Neville Franks21-Jan-03 9:08
Neville Franks21-Jan-03 9:08 
GeneralRe: Hanldes question - need experts opinion Pin
AlexO21-Jan-03 4:04
AlexO21-Jan-03 4:04 
GeneralRe: Hanldes question - need experts opinion Pin
Yaron Nir21-Jan-03 4:13
Yaron Nir21-Jan-03 4:13 
GeneralRe: Hanldes question - need experts opinion Pin
AlexO21-Jan-03 4:16
AlexO21-Jan-03 4:16 
Generaltool Pin
AlexO21-Jan-03 4:19
AlexO21-Jan-03 4:19 
GeneralRe: tool Pin
Yaron Nir21-Jan-03 4:23
Yaron Nir21-Jan-03 4:23 
QuestionHow to insert row into Excel Pin
Jack_pt21-Jan-03 3:48
Jack_pt21-Jan-03 3:48 
Generalredirect user I/O to a temporary ‘buffer’ Pin
rohit.dhamija21-Jan-03 3:37
rohit.dhamija21-Jan-03 3:37 
GeneralMSDN Pin
AlexO21-Jan-03 3:58
AlexO21-Jan-03 3:58 
GeneralRe: MSDN Pin
rohit.dhamija21-Jan-03 17:17
rohit.dhamija21-Jan-03 17:17 
Generalfor excel automation Pin
Gérald Mercet21-Jan-03 2:05
Gérald Mercet21-Jan-03 2:05 
GeneralRe: for excel automation Pin
21-Jan-03 2:14
suss21-Jan-03 2:14 
GeneralRe: for excel automation Pin
Gérald Mercet21-Jan-03 2:31
Gérald Mercet21-Jan-03 2:31 

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.