PPC - Designing Full-Screen Dialog Boxes

From YYpBD's MediaWiki

Jump to: navigation, search

case WM_INITDIALOG:
{
    BOOL rb;
    int rc;
    SHINITDLGINFO sid;

    sid.dwMask = SHIDIM_FLAGS;  // This is the only allowed value.
    sid.dwFlags = SHIDIF_SIZEDLGFULLSCREEN;  // Make the DB full screen.
    sid.hDlg = hwnd;  // Handle to the dialog box.

    rb = SHInitDialog(&sid);
    if (rb == FALSE)  // SHInitDialog failed.
    {
        rc = MessageBox(NULL, _T(Could not create dialog box.),
                        _T(Error), MB_OK);
        if (rc == 0)  // Not enough memory to create MessageBox.
            return E_OUTOFMEMORY;
        return E_FAIL;  // Replace with specific error handling.
    }
    break;  // From case WM_INITDIALOG.
}
맞춤검색