summaryrefslogtreecommitdiff
path: root/cppe/test/Common/TestCommon.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2005-07-15 15:47:09 +0000
committerMatthew Newhook <matthew@zeroc.com>2005-07-15 15:47:09 +0000
commitbc02b784807e8d979acb3a628039eaf6b5aefb75 (patch)
treedc489510e9bc4c18e24c5459cc2a029e64688a75 /cppe/test/Common/TestCommon.cpp
parentadd hello world client midlet (diff)
downloadice-bc02b784807e8d979acb3a628039eaf6b5aefb75.tar.bz2
ice-bc02b784807e8d979acb3a628039eaf6b5aefb75.tar.xz
ice-bc02b784807e8d979acb3a628039eaf6b5aefb75.zip
Updated README. Fixed MFC screen size. Fixed test suite screen size.
Started mods for using an optional configuration file.
Diffstat (limited to 'cppe/test/Common/TestCommon.cpp')
-rwxr-xr-xcppe/test/Common/TestCommon.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/cppe/test/Common/TestCommon.cpp b/cppe/test/Common/TestCommon.cpp
index bfdf294a1b1..bff01344358 100755
--- a/cppe/test/Common/TestCommon.cpp
+++ b/cppe/test/Common/TestCommon.cpp
@@ -15,7 +15,6 @@
# include <IceE/Time.h>
#endif
-
#include <stdarg.h>
using namespace Ice;
@@ -259,8 +258,21 @@ TestApplication::main(HINSTANCE hInstance)
mbstowcs(wName, _name.c_str(), len);
wName[len] = L'\0';
}
+
+ RECT rect;
+ GetClientRect(GetDesktopWindow(), &rect);
+ int width = rect.right - rect.left;
+ if(width > 320)
+ {
+ width = 320;
+ }
+ int height = rect.bottom - rect.top;
+ if(height > 200)
+ {
+ height = 200;
+ }
mainWnd = CreateWindow(windowClassName, wName, WS_VISIBLE|WS_OVERLAPPED|WS_SYSMENU|WS_SIZEBOX,
- CW_USEDEFAULT, CW_USEDEFAULT, 320, 200,
+ CW_USEDEFAULT, CW_USEDEFAULT, width, height,
NULL, NULL, hInstance, NULL);
if(mainWnd == NULL)
{