Ejemplo n.º 1
0
int COleChangeIconDialog::DoModal()
{
	ASSERT_VALID(this);
	ASSERT(m_ci.lpfnHook != NULL);  // can still be a user hook

	m_ci.hWndOwner = PreModal();
	int iResult = MapResult(::OleUIChangeIcon(&m_ci));
	PostModal();
	return iResult;
}
Ejemplo n.º 2
0
int COleConvertDialog::DoModal()
{
	ASSERT_VALID(this);
	ASSERT(m_cv.lpfnHook != NULL);  // can still be a user hook

	m_cv.hWndOwner = PreModal();
	int iResult = MapResult(::OleUIConvert(&m_cv));
	PostModal();
	return iResult;
}
Ejemplo n.º 3
0
int COleInsertDialog::DoModal()
{
	ASSERT_VALID(this);
	ASSERT(m_io.lpfnHook != NULL);  // can still be a user hook

	m_io.hWndOwner = PreModal();
	int iResult = MapResult(::OleUIInsertObject(&m_io));
	PostModal();
	return iResult;
}
Ejemplo n.º 4
0
int COleLinksDialog::DoModal()
{
	ASSERT_VALID(this);
	ASSERT(m_el.lpfnHook != NULL);  // can still be a user hook

	// this function is always used for updating links
	m_xLinkInfo.m_bUpdateLinks = TRUE;

	m_el.hWndOwner = PreModal();
	int iResult = MapResult(::OleUIEditLinks(&m_el));
	PostModal();
	return iResult;
}
Ejemplo n.º 5
0
int COlePasteSpecialDialog::DoModal()
{
	ASSERT_VALID(this);
	ASSERT(m_ps.lpfnHook != NULL);  // can still be a user hook

	// return error if IDataObject* not available
	if (m_ps.lpSrcDataObj == NULL)
		return -1;

	m_ps.hWndOwner = PreModal();
	int iResult = MapResult(::OleUIPasteSpecial(&m_ps));
	PostModal();
	return iResult;
}
Ejemplo n.º 6
0
INT_PTR COleBusyDialog::DoModal()
{
    // Note: we don't call EnableModeless because that in itself implies
    //  outgoing calls.  This dialog is normally brought up when an outgoing
    //  call cannot be made.

    // find parent HWND
    HWND hWndTop;
    HWND hParent = CWnd::GetSafeOwner_(m_pParentWnd->GetSafeHwnd(), &hWndTop);
    m_bz.hWndOwner = hParent;

    // run the dialog
    AfxHookWindowCreate(this);
    int iResult = ::OleUIBusy(&m_bz);
    AfxUnhookWindowCreate();   // just in case
    Detach();   // just in case

    // enable top level window
    if (hWndTop != NULL)
        ::EnableWindow(hWndTop, TRUE);

    // map the result
    if (iResult == OLEUI_CANCEL)
        return IDCANCEL;

    if (iResult == OLEUI_BZ_SWITCHTOSELECTED)
        m_selection = switchTo;
    else if (iResult == OLEUI_BZ_RETRYSELECTED)
        m_selection = retry;
    else if (iResult == OLEUI_BZ_CALLUNBLOCKED)
        m_selection = callUnblocked;
    else
        m_selection = (Selection)MapResult(iResult);

    return IDOK;
}
Ejemplo n.º 7
-1
int COlePropertiesDialog::DoModal()
{
	ASSERT_VALID(this);
	ASSERT(m_gp.lpfnHook != NULL);  // can still be a user hook
	ASSERT(m_vp.lpfnHook != NULL);  // can still be a user hook
	ASSERT(m_lp.lpfnHook != NULL);  // can still be a user hook

	// disable scale if OnApplyScale not implemented
	if (!OnApplyScale(NULL, -1, FALSE))
		m_op.lpVP->dwFlags |= VPF_DISABLESCALE;

	// invoke the dialog
	m_op.lpPS->hwndParent = PreModal();
	int iResult = MapResult(::OleUIObjectProperties(&m_op));
	PostModal();
	return iResult;
}