[Solved] Direct3d (D3D10) Full Screen

  • Does anyone have a code snippet to handle switching between windowed and full-screen mode for a Qt widget displaying directX 10 as seen in "My other post":http://developer.qt.nokia.com/forums/viewthread/10328 ?

    I'm looking for both windowed/fullscreen transition, as well as a good way to handle resizing.

    Resizing seems to handle automatically for me but I'm not sure I should count on this.

  • I found the way to resize using WM_SIZE.

    Basically I was looking for how the winEvent function in QWidget was passing the lParam and wParam from the Windows messages (win32) and I found that they can be referenced using accessor methods in the MSG* type passed to winEvent.

    @winEvent(MSG* message, long* result)
    bool returnValue = false;
    case WM_SIZE:

            int width = LOWORD(message->lparam);
            int height = HIWORD(message->lparam);
            //rest of code here


    Still working on full-screen.

  • I think I have a full-screen solution for now.

    I'm going to use Qt::FramelessWindowHint and showMaximized() to display a full screen. This doesn't let me alt-enter to change modes but is good enough for me at the moment.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.