/// <summary>
/// Dispatch the message to the handler function
/// </summary>
/// <param name="hWnd">The handle to the window which receives the message</param>
/// <param name="uMsg">The message identifier</param>
/// <param name="wParam">The additional message information</param>
/// <param name="lParam">The additional message information</param>
/// <returns>If the message has been processed by handler function, TRUE is returned. Otherwise FALSE is returned and the message is handled by default dialog procedure</returns>
LRESULT KinectWindow::DialogProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    switch (uMsg)
    {
    case WM_STREAMEVENT:
        UpdateStreams();
        break;

    case WM_TIMEREVENT:
        UpdateTimedStreams();
        break;

    case WM_INITDIALOG:
        NuiViewer::SetIcon(hWnd);
        break;

    case WM_SIZE:
        OnResize();
        break;

    case WM_COMMAND:
        OnCommand(wParam);
        break;

    case WM_NOTIFY:
        OnNotify(lParam);
        break;

    case WM_CLOSE:
        OnClose(hWnd, wParam);
        break;

    case WM_DESTROY:
        PostQuitMessage(0);
        break;

    case WM_SHOWKINECTWINDOW:
        {
            if (0 != wParam)
            {
                ShowWindows();
            }
        }
        break;

    default:
        break;
    }

    return FALSE;
}
Example #2
0
void DownloadPage::onExpertModeToggle() {
  static const int expertControlIds[] = {
    IDC_SETTINGS_DOWNLOAD_LIMITS,
    
    IDC_DOWNLOADS,
    IDC_SLOTSSPIN,
    IDC_SETTINGS_FILES_MAX,

    IDC_FILES,
    IDC_FILESPIN,
    IDC_SETTINGS_DOWNLOADS_MAX,

    IDC_MAXSPEED,
    IDC_SPEEDSPIN,
    IDC_SETTINGS_DOWNLOADS_SPEED_PAUSE,

    IDC_SETTINGS_SPEEDS_NOT_ACCURATE
  };
  ShowWindows(expertControlIds, isExpertMode());
}