Knowledge Base |

# PRB: Setup Toolkit DoMsgBox Shows Wrong Buttons or Icons

Article ID: 113939

Article Last Modified on 3/10/2000

APPLIES TO

- Microsoft Windows Software Development Kit 3.1

This article was previously published under Q113939

## SYMPTOMS

Only the MB_OK, MB_ICONHAND, and MB_TASKMODAL styles are recognized in the wType% parameter. Any additional styles are ignored and the message box will only show the OK button.

## CAUSE

Only the MB_OK, MB_ICONHAND, and MB_TASKMODIAL constants are defined in SETUPAPI.INC. Although DoMsgBox() can use all the constants described in the Microsoft Windows 3.1 SDK under the MessageBox() function, these constants are not defined in SETUPAPI.INC and hence are ignored in the call to DoMsgBox().

## RESOLUTION

Modify SETUPAPI.INC to include definitions of the missing style constants or pass the numerical value in the wType% parameter rather than the SDK constant.
Below is a list of all of the possible styles you can specify in the wType% parameter of the DoMsgBox() function. Cut and paste the needed constants into your SETUPAPI.INC file.

    CONST MB_OK                = 0
    CONST MB_OKCANCEL          = 1
    CONST MB_ABORTRETRYIGNORE  = 2
    CONST MB_YESNOCANCEL       = 3
    CONST MB_YESNO             = 4
    CONST MB_RETRYCANCEL       = 5

    CONST MB_ICONHAND          = 16
    CONST MB_ICONQUESTION      = 32
    CONST MB_ICONEXCLAMATION   = 48
    CONST MB_ICONASTERISK      = 64

    CONST MB_ICONINFORMATION   = 64
    CONST MB_ICONSTOP          = 16

    CONST MB_DEFBUTTON1        = 0
    CONST MB_DEFBUTTON2        = 256
    CONST MB_DEFBUTTON3        = 512

    CONST MB_APPLMODAL         = 0
    CONST MB_SYSTEMMODAL       = 4096
    CONST MB_TASKMODAL         = 8192

Additional query words: MSSetup tool kit

Keywords: kb16bitonly kbprb KB113939