I'm using MFC, and a CEdit control. My problem right now is changing the font. I've asked a few friends for help, and that didn't work out to well (thanks though), and so I thought I'd come here. I've also tried the examples and reading what MSDN says, but that also has failed. Here's the current code I'm using:
Code:
#include "stdafx.h"
#include "NoteX.h"
#include "NoteXDoc.h"
#include "NoteXView.h"
CNoteXView *pView;
#include "MainFrm.h"
//.....
void CMainFrame::OnChangeFont()
{
CFontDialog cfd;
CFont cf;
LOGFONT lf;
if(cfd.DoModal() == IDOK){
//cf.CreateFontIndirect(&lf);
cfd.GetCurrentFont(&lf);
cf.CreateFontIndirect(&lf);
pView = (CNoteXView*)GetActiveView();
pView->SendMessage(WM_SETFONT, (WPARAM)&cf, 0);
}
}
Does anyone know why this isn't working?