vbscript: Support vb* constants for message box buttons.

This commit is contained in:
Nikolay Sivov 2012-10-03 15:53:42 +04:00 committed by Alexandre Julliard
parent 8e6d2bab37
commit 6666284fe6
3 changed files with 26 additions and 13 deletions

View file

@ -1594,38 +1594,38 @@ static HRESULT Global_vbFirstFullWeek(vbdisp_t *This, VARIANT *arg, unsigned arg
static HRESULT Global_vbOKOnly(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
{
FIXME("\n");
return E_NOTIMPL;
TRACE("\n");
return return_short(res, MB_OK);
}
static HRESULT Global_vbOKCancel(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
{
FIXME("\n");
return E_NOTIMPL;
TRACE("\n");
return return_short(res, MB_OKCANCEL);
}
static HRESULT Global_vbAbortRetryIgnore(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
{
FIXME("\n");
return E_NOTIMPL;
TRACE("\n");
return return_short(res, MB_ABORTRETRYIGNORE);
}
static HRESULT Global_vbYesNoCancel(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
{
FIXME("\n");
return E_NOTIMPL;
TRACE("\n");
return return_short(res, MB_YESNOCANCEL);
}
static HRESULT Global_vbYesNo(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
{
FIXME("\n");
return E_NOTIMPL;
TRACE("\n");
return return_short(res, MB_YESNO);
}
static HRESULT Global_vbRetryCancel(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
{
FIXME("\n");
return E_NOTIMPL;
TRACE("\n");
return return_short(res, MB_RETRYCANCEL);
}
static HRESULT Global_vbCritical(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)

View file

@ -299,4 +299,17 @@ end if
Call ok(getVT(Now()) = "VT_DATE", "getVT(Now()) = " & getVT(Now()))
Call ok(vbOKOnly = 0, "vbOKOnly = " & vbOKOnly)
Call ok(getVT(vbOKOnly) = "VT_I2", "getVT(vbOKOnly) = " & getVT(vbOKOnly))
Call ok(vbOKCancel = 1, "vbOKCancel = " & vbOKCancel)
Call ok(getVT(vbOKCancel) = "VT_I2", "getVT(vbOKCancel) = " & getVT(vbOKCancel))
Call ok(vbAbortRetryIgnore = 2, "vbAbortRetryIgnore = " & vbAbortRetryIgnore)
Call ok(getVT(vbAbortRetryIgnore) = "VT_I2", "getVT(vbAbortRetryIgnore) = " & getVT(vbAbortRetryIgnore))
Call ok(vbYesNoCancel = 3, "vbYesNoCancel = " & vbYesNoCancel)
Call ok(getVT(vbYesNoCancel) = "VT_I2", "getVT(vbYesNoCancel) = " & getVT(vbYesNoCancel))
Call ok(vbYesNo = 4, "vbYesNo = " & vbYesNo)
Call ok(getVT(vbYesNo) = "VT_I2", "getVT(vbYesNo) = " & getVT(vbYesNo))
Call ok(vbRetryCancel = 5, "vbRetryCancel = " & vbRetryCancel)
Call ok(getVT(vbRetryCancel) = "VT_I2", "getVT(vbRetryCancel) = " & getVT(vbRetryCancel))
Call reportSuccess()

View file

@ -85,7 +85,7 @@ library VBScript_Global
[id(DISPID_GLOBAL_VBYESNO), readonly]
VARIANT vbYesNo;
[id(DISPID_GLOBAL_VBYESNOCANCEL), readonly]
[id(DISPID_GLOBAL_VBRETRYCANCEL), readonly]
VARIANT vbRetryCancel;
[id(DISPID_GLOBAL_VBCRITICAL), readonly]