请教一个问题。。。
void CBitmapEditorDemoDlg::OnBnClickedBtnlogo()
{
// TODO: Add your control notification handler code here
TCHAR tchBMPPath[MAX_PATH] = {0};
CFileDialog dlg(TRUE, NULL, tchBMPPath,
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT);
dlg.DoModal();
m_filepath = dlg.GetPathName();
UpdateData(FALSE);
m_picctl.SetBitmap(m_filepath);
CDC dc;
HDC hDC;
CRect rect;
hDC = ::GetDC(m_picctl.m_hWnd); //Get the DC for the CPicture Box
m_picctl.GetClientRect(&rect);
dc.Attach(hDC);
CPen pen(PS_SOLID, 1, RGB(0,255,0));
CPen* pOldPen = dc.SelectObject(&pen);
dc.TextOut(rect.right / 2, rect.bottom /2, _T("test"));
return;
}
2005下,想在现实的图片上写字,就是不行,哪位能帮忙看看问题出在什么地方?
谢谢