Курсовая работа: Проект текстового редактора
if (fontDlg.DoModal())
{fontDlg.GetCurrentFont(&lfText);
m_fontText.DeleteObject();
m_fontText.CreateFontIndirect(&lfText);
m_Edit1.SetFont(&m_fontText);}
}
void CMenuDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
if (IsWindow(m_wndStatusBar.m_hWnd))
{
m_wndStatusBar.MoveWindow(0, 0, 0, 0);
CRect rect;
m_wndStatusBar.GetClientRect(&rect);
int nParts[] = {rect.right - 200, - 1};
m_wndStatusBar.SetParts(sizeof(nParts)/sizeof(nParts[0]), nParts);
CString strPartsStatusBar;
strPartsStatusBar.Format(_T("Строка %d, столбец %d"), m_nStrStatusBar, m_nStolbetsStatusBar);
}
CWnd *pEdit = GetDlgItem(IDC_EDIT1);
if (pEdit != NULL)
{
CRect rcClient;
GetClientRect(rcClient);
rcClient.InflateRect(-2, -2, -2, -20);
pEdit->MoveWindow(rcClient);
if(IsWindow(m_Edit1.m_hWnd))
{
m_wndStatusBar.MoveWindow(0, 0, 0, 0);