Created
February 1, 2012 02:33
-
-
Save kumatti1/1714700 to your computer and use it in GitHub Desktop.
VBAでのTaskDialog(Win7SP1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Enum ICONS | |
TD_WARNING_ICON = 65535 | |
TD_ERROR_ICON = 65534 | |
TD_INFORMATION_ICON = 65533 | |
TD_SHIELD_ICON = 65532 | |
End Enum | |
Enum TASKDIALOG_COMMON_BUTTON_FLAGS | |
TDCBF_OK_BUTTON = &H1 | |
TDCBF_YES_BUTTON = &H2 | |
TDCBF_NO_BUTTON = &H4 | |
TDCBF_CANCEL_BUTTON = &H8 | |
TDCBF_RETRY_BUTTON = &H10 | |
TDCBF_CLOSE_BUTTON = &H20 | |
End Enum | |
Declare Function TaskDialog& Lib "C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll" (ByVal hWndParent&, ByVal hInstance&, ByVal pszWindowTitle&, ByVal pszMainInstruction&, ByVal pszContent&, ByVal dwCommonButtons&, ByVal pszIcon&, ByVal pnButton&) | |
Sub hoge() | |
Dim ret& | |
TaskDialog Application.Hwnd, 0, _ | |
StrPtr("タイトル"), _ | |
StrPtr("hoge"), _ | |
StrPtr("foo"), _ | |
TDCBF_OK_BUTTON, _ | |
TD_WARNING_ICON, _ | |
VarPtr(ret) | |
Debug.Print ret | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment