Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Direct3d (D3D10) Full Screen
QtWS25 Last Chance

[Solved] Direct3d (D3D10) Full Screen

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 3.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hornsj2
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Hornsj2
      wrote on last edited by
      #2

      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.

      Example:
      @winEvent(MSG* message, long* result)
      {
      bool returnValue = false;
      switch(message->message)
      {
      case WM_SIZE:

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

      }@

      Still working on full-screen.

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hornsj2
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved