func(char *buf)
{
    int retval;
    do {
        retval = MessageBox(0, buf, "MSGBOX", MB_OKCANCEL);
    } while (retval != IDOK);
}

Figure 6: A piece of Windows application code.

Back to Article