Implemented wxGetClientDisplayRect which returns the dimensions of the
desktop minus taskbar, etc. on Windows and defaults to the full desktop dimensions on other platforms. (If there is a way to do it for other platforms please do.) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
|
||||
// In some mingws there is a missing extern "C" int the winsock header,
|
||||
// so we put it here just to be safe. Note that this must appear _before_
|
||||
// #include "wx/msw/private.h" which itself includes <windows.h>, as this
|
||||
// #include "wx/msw/private.h" which itself includes <windows.h>, as this
|
||||
// one in turn includes <winsock.h> unless we define WIN32_LEAN_AND_MEAN.
|
||||
//
|
||||
#if defined(__WIN32__) && !defined(__TWIN32__) && ! (defined(__GNUWIN32__) && !defined(__MINGW32__))
|
||||
@@ -617,7 +617,7 @@ int wxGetOsVersion(int *majorVsn, int *minorVsn)
|
||||
*majorVsn = info.dwMajorVersion;
|
||||
if (minorVsn)
|
||||
*minorVsn = info.dwMinorVersion;
|
||||
|
||||
|
||||
switch ( info.dwPlatformId )
|
||||
{
|
||||
case VER_PLATFORM_WIN32s:
|
||||
@@ -1032,6 +1032,18 @@ void wxDisplaySizeMM(int *width, int *height)
|
||||
if ( height ) *height = GetDeviceCaps(dc, VERTSIZE);
|
||||
}
|
||||
|
||||
void wxClientDisplayRect(int *x, int *y, int *width, int *height)
|
||||
{
|
||||
// Determine the desktop dimensions minus the taskbar and any other
|
||||
// special decorations...
|
||||
RECT r;
|
||||
SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0);
|
||||
if (x) *x = r.left;
|
||||
if (y) *y = r.top;
|
||||
if (width) *width = r.right - r.left;
|
||||
if (height) *height = r.bottom - r.top;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// window information functions
|
||||
|
Reference in New Issue
Block a user