PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Menubar in DX Fullscreen Application


Gast
2004-02-21, 14:45:27
Hallo!

Ich habe mal eine Frage, bezüglich DX Applications und Menus (Visual C++ 6.0 && DX SDK 9). Ist es möglich, im Fullscreen Mode System Menus anzuzeigen? Ich habs probiert, im Windowed Mode ist das kein Problem, aber im Fullscreen Mode wurde die Menubar nich angezeigt. Als ich dann einen Shortcut gedrückt habe, hat er sie angezeigt. Bitte um Codeschnipsel, Links, ...
Dann wäre da noch was, ist es möglich einen OpenFile Dialog im Fullscreen Mode anzeigen zu lassen?

Bitte um HILFE!

thx,

Stefan

Demirug
2004-02-21, 15:09:45
Windows UI Elemente vertragen sich nicht mit dem Fullscreen Modus.

ScottManDeath
2004-02-21, 15:15:11
Geht, wirst wohl aber nicht die 1000FPS knacken ;)
Es gibt im SDK auch ein Sample dazu, musst du mal gucken...

(aus der msdn....)

IDirect3DDevice9::SetDialogBoxMode Method

--------------------------------------------------------------------------------

This method allows the use of Microsoft® Windows® Graphics Device Interface (GDI) dialog boxes in full-screen mode applications.

Syntax

HRESULT SetDialogBoxMode( BOOL bEnableDialogs
);
Parameters

bEnableDialogs
[in] TRUE to enable GDI dialog boxes, and FALSE to disable them.
Return Value

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL unless all of the following are true.
The application specified a back buffer format compatible with GDI, in other words, one of D3DFMT_X1R5G5B5, D3DFMT_R5G6B5, or D3DFMT_X8R8G8B8.
The application specified no multisampling.
The application specified D3DSWAPEFFECT_DISCARD.
The application specified D3DPRESENTFLAG_LOCKABLE_BACKBUFFER.
The application did not specify D3DCREATE_ADAPTERGROUP_DEVICE.
The application is not between BeginScene and EndScene.



Remarks

The GDI dialog boxes must be created as child to the device window. They should also be created within the same thread that created the device because this enables the parent window to manage redrawing the child window.

The method has no effect for windowed mode applications, but this setting will be respected if the application resets the device into full-screen mode. If SetDialogBoxMode succeeds in a windowed mode application, any subsequent reset to full-screen mode will be checked against the restrictions listed above. Also, SetDialogBoxMode causes all back buffers on the swap chain to be discarded, so an application is expected to refresh its content for all back buffers after this call.