Try this:
void makebold(HWND hwnd)
{
HFONT hFontB,hFont = (HFONT)SendMessage(hwnd,WM_GETFONT,0,0);
LOGFONT lf;
GetObject(hFont, sizeof(LOGFONT), &lf);
lf.lfWeight = FW_BOLD;
hFontB = CreateFontIndirect(&lf);
SendMessage(hwnd,WM_SETFONT,(int)hFontB,1);
}
The argument to pass is the
m_hWnd
from your CEdit control.