怎么获得字体?????
请看如下代码:
m_hOk是一个Button的句柄 CWnd *m_hok
void CMyoicqDlg::CreateButton()
{
CFont *m_font=m_hOk->GetFont();
CRect rect;
m_hOk->GetWindowRect(rect);
m_hOk->ScreenToClient(rect);
rect.left+=10;
rect.top+=10;
rect.bottom+=10;
rect.right+=10;
m_hOk->ShowWindow(SW_HIDE);
m_hOk->EnableWindow(FALSE);
if(m_button.Create("Button1",WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_DEFPUSHBUTTON,
rect,m_hOicq,IDC_STARTBUTTON)==FALSE)
MessageBox("error");
m_button.SetFont(m_font,TRUE);
}
为什么m_button的字体看起来明显和m_hOk的字体不一样;