// RebootPromptDlg.cpp : implementation file
//

#include "stdafx.h"
#include "InstallUtils.h"
#include "RebootPromptDlg.h"


// CRebootPromptDlg dialog

IMPLEMENT_DYNAMIC(CRebootPromptDlg, CDialogEx)

CRebootPromptDlg::CRebootPromptDlg(CWnd* pParent /*=NULL*/)
: CDialogEx(IDD_REBOOTPROMPTDLG, pParent)
, m_oRtsddLogoPoint(11, 11)
, m_oRtsddLogoRect(11, 11, 308, 275)
, m_sRebootPurposeText(_T(""))
, m_sRebootPromptText(_T("Нажмёте кнопку \"Перезагрузка\" и компьютер автоматически перезагрузится после окончания процесса установки."))
{
    m_oRtsddLogoImage.LoadFromResource(
        AfxGetInstanceHandle(),
        IDB_RTSDD_LOGO
        );
}

CRebootPromptDlg::~CRebootPromptDlg()
{
}

void CRebootPromptDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialogEx::DoDataExchange(pDX);
    DDX_Text(pDX, IDC_REBOOT_PURPOSE_TEXT, m_sRebootPurposeText);
    DDX_Text(pDX, IDC_REBOOT_PROMPT_TEXT, m_sRebootPromptText);
}


BEGIN_MESSAGE_MAP(CRebootPromptDlg, CDialogEx)
    ON_WM_PAINT()
END_MESSAGE_MAP()


// CRebootPromptDlg message handlers


BOOL CRebootPromptDlg::OnInitDialog()
{
    BOOL    bRet;
    CDialogEx::OnInitDialog();
    // TODO:  Add extra initialization here
    bRet = SetBackgroundImage(
        IDB_DIALOG_BACKGROUND,
        BACKGR_TOPLEFT,
        FALSE
        );
    ASSERT(bRet);
    return TRUE;  // return TRUE unless you set the focus to a control
                  // EXCEPTION: OCX Property Pages should return FALSE
}


void CRebootPromptDlg::OnPaint()
{
    BOOL     bRet;
    CPaintDC dc(this); // device context for painting
                       // TODO: Add your message handler code here
                       // Do not call CDialogEx::OnPaint() for painting messages
    bRet = m_oRtsddLogoImage.TransparentBlt(
        dc,
        m_oRtsddLogoRect,
        RGB(255, 0, 0)
        );
    ASSERT(bRet);
}
