View Single Post
Go4Expert Member
6Jun2010,13:32  
Mike911's Avatar
I need to prevent my window from going minimized to tray when I click the Minimize-Button.
I write in native C++ with additional use of DX10, DXGI, Direct2D and DirectWrite.

I proceed the WM_WINDOWPOSCHANGING. But how did I know if its triggered from a Minimize-Button ( WM_SIZE is already too late ) ?

Problem 2 : Catching messages
Code:
MSG    CoreApp::RunMessageLoop()
{
  MSG  msg;
  while ( GetMessage( &msg, NULL, 0, 0 ))
  {    
    Debug_WriteLine ( ganzzahl( msg.message )); // my readout
    TranslateMessage(&msg);
    DispatchMessage(&msg);
  }
  return msg;
}

Why did I get such different numbers like 15,161,674,.. instead of Defines WM_WINDOWPOSCHANGING 0x0046 (70) ?

The next questions I ask is a multi-monitoring scenario.
Two windows are generated via CreateWindow() and one of them is set to Fullscreen via DXGISwapchain->SetFullscreenState(true,NULL);

Problem 3:
The titlebar of the windowed window hangs now with their button-lightningeffects, why this ?
There´s nothing to read about that in the DXGI documentation.

Problem 4:
If the windowed rectangle intersects with the fullscreen rectangle it switches back to windowed.
Even in a minimize or restore animation, if it intersects it produces errors.
How can I develop a secure codepath for displaying two windows together (Full and Windowed) ?
How can I guarantee that Fullscreen stays fullscreen ?

Developing since about 20 years I came to the result that I need a cost-expensive Microsoft-Help-Line.