private static bool MessageBoxEnumProc(IntPtr hWnd, IntPtr lParam)
{
StringBuilder stringBuilder = new StringBuilder(10);
MessageBoxManager.GetClassName(hWnd, stringBuilder, stringBuilder.Capacity);
if (stringBuilder.ToString() == "Button")
{
switch (MessageBoxManager.GetDlgCtrlID(hWnd))
{
case 1:
MessageBoxManager.SetWindowText(hWnd, MessageBoxManager.OK);
break;
case 2:
MessageBoxManager.SetWindowText(hWnd, MessageBoxManager.Cancel);
break;
case 3:
MessageBoxManager.SetWindowText(hWnd, MessageBoxManager.Abort);
break;
case 4:
MessageBoxManager.SetWindowText(hWnd, MessageBoxManager.Retry);
break;
case 5:
MessageBoxManager.SetWindowText(hWnd, MessageBoxManager.Ignore);
break;
case 6:
MessageBoxManager.SetWindowText(hWnd, MessageBoxManager.Yes);
break;
case 7:
MessageBoxManager.SetWindowText(hWnd, MessageBoxManager.No);
break;
}
MessageBoxManager.nButton++;
}
return(true);
}