[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.
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.