I am trying to select a Font from CFontDialog but its not working. Can somebody plz help me ?
I am using following code:
CFontDialog dlgChooseFont;
if( dlgChooseFont.DoModal() == IDOK)
{
if(!ptrlogfont) ptrlogfont = new LOGFONT;
memcpy(ptrlogfont, &(dlgChooseFont.m_lf), sizeof(LOGFONT));
fontcolor = dlgChooseFont.GetColor();
hfont = CreateFontIndirect(ptrlogfont);
ptreditwin->SendMessage(WM_SETFONT, (UINT) hfont, 0L);
}
Zulfi
I am using following code:
CFontDialog dlgChooseFont;
if( dlgChooseFont.DoModal() == IDOK)
{
if(!ptrlogfont) ptrlogfont = new LOGFONT;
memcpy(ptrlogfont, &(dlgChooseFont.m_lf), sizeof(LOGFONT));
fontcolor = dlgChooseFont.GetColor();
hfont = CreateFontIndirect(ptrlogfont);
ptreditwin->SendMessage(WM_SETFONT, (UINT) hfont, 0L);
}
Zulfi