Welcome to
www.tdxlibrary.org
Home of the
the TDx_Library...
"RAD DirectX"
for
C++ Builder
...
|
TDx_Draw_Library v2.00 Component Reference
|
|
[ TDx_Draw::SetCooperativeLevel() ]
[ next: SetDisplayMode() ]
[ prev: RestoreDisplayMode() ]
public:
virtual bool __fastcall SetCooperativeLevel( HWND pWnd, dword pFlags );
TDX_DRAW::SETCOOPERATIVELEVEL()
[ component method ]
- Description
The
TDx_Draw::SetCooperativeLevel
method
will
define
the
level
of
access
an
application
has
to
system
resources.
Either
the
DDSCL_EXCLUSIVE
or
DDSCL_NORMAL
flag
must
be
set.
This
method
must
be
called
by
the
thread
that
created
the
application
window
and
is
used
to
determine
if
a
full
screen
or
windowed
application
is
required.
Full
screen
exclusive
mode
allows
full
utilisation
of
video
hardware
capabilities.
Normal
mode
precludes
page
flipping
and
changing
the
primary
surfaces
pallete,
multiple
window
applications
can
be
written
by
passing
NULL
as
the
window
handle
and
setting
DDSCL_NORMAL.
DirectDraw
does
not
send
activation
event
messages
to
all
of
an
applications
windows,
only
the
top-level
window.
Child
windows
that
require
activation
event
messages
will
have
to
be
subclassed.
If
the
method
call
fails,
the
OnError
event
will
be
triggered
with
one
of
the
following
values:
DDERR_EXCLUSIVEMODEALREADYSET
DDERR_HWNDALREADYSET
DDERR_HWNDSUBCLASSED
DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_OUTOFMEMORY
- Parameters
Wnd
The Wnd parameter defines the top level window handle of the application for which the cooperative levels are being set.
If DDSCL_NORMAL is set in the Flags parameter then this parameter may be NULL.
Flags
The Flags parameter defines flags indicating the cooperative level settings for the application.
The described effect applies when the flag is set.
DDSCL_ALLOWMODEX
Mode X display modes may be used.
When this flag is set, DDSCL_EXCLUSIVE and DDSCL_FULLSCREEN must also be set.
Refer to the DirectX SDK for details on "Mode X and Mode 13 Display Modes" limitations.
DDSCL_ALLOWREBOOT
CTRL+ALT+DEL may be used when DDSCL_EXCLUSIVE and DDSCL_FULLSCREEN are set.
DDSCL_CREATEDEVICEWINDOW
A default device window is to be created and managed.
Applications can have one device window for each display device.
Support for this flag only exists in Windows 98 and Windows NT 2000.
DDSCL_EXCLUSIVE
Requests exclusive level access for the application.
DDSCL_FULLSCREEN must also be set.
DDSCL_FPUPRESERVE
TDx_3D will preserve the FPU state by saving and restoring its settings whenever it needs to modify it.
DDSCL_FPUSETUP
The floating point unit is likely to remain set for optimal 3D performance to avoid the need for explicitly setting it each time.
DDSCL_FULLSCREEN
The exclusive mode application is responsible for the primary surface.
DDSCL_EXCLUSIVE must also be set. The GDI can effectively be ignored.
DDSCL_MULTITHREADED
Requests multithread safe TDx_Draw behavior.
TDx_3D will take the global critical section more frequently.
DDSCL_NORMAL
The application functions via the regular Windows handling routines.
When this flag is set, DDSCL_ALLOWMODEX, DDSCL_EXCLUSIVE and DDSCL_FULLSCREEN may not be set.
DDSCL_NOWINDOWCHANGES
The application window will not be minimized or restored on activation.
DDSCL_SETDEVICEWINDOW
The Wnd parameter of this method contains the handle of the device window to be set.
The DDSCL_SETFOCUSWINDOW flag cannot also be set.
Support for this flag only exists in Windows 98 and Windows NT 2000.
DDSCL_SETFOCUSWINDOW
The Wnd parameter of this method contains the handle of the focus window.
DDSCL_SETDEVICEWINDOW cannot also be set.
Support for this flag only exists in Windows 98 and Windows NT 2000.
- See Also
- Top
If you would like to submit additions or improvements to this page, click: darren_john_dwyer@hotmail.com.
|
|