fix display-left-top-offset for Windows

svn: r3075
This commit is contained in:
Matthew Flatt 2006-05-26 15:19:10 +00:00
parent f4386a4598
commit 95c4a62896
2 changed files with 4 additions and 7 deletions

View File

@ -334,7 +334,7 @@ extern Bool wxColourDisplay(void);
extern int wxDisplayDepth(void);
extern void wxDisplaySize(int *width, int *height, int flags = 0);
extern void wxDisplayOrigin(int *x, int *y);
extern void wxDisplayOrigin(int *x, int *y, int flags = 0);
extern void wxSetCursor(wxCursor *cursor);

View File

@ -1615,10 +1615,7 @@ void wxDisplaySize(int *width, int *height, int flags)
{
RECT r;
if (!flags && SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0)) {
*width = (r.right - r.left);
*height = (r.bottom - r.top);
} else {
{
HDC dc;
int dw, dh;
dc = ::GetDC(NULL);
@ -1630,11 +1627,11 @@ void wxDisplaySize(int *width, int *height, int flags)
}
}
void wxDisplayOrigin(int *x, int *y)
void wxDisplayOrigin(int *x, int *y, int flags)
{
RECT r;
if (SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0)) {
if (flags && SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0)) {
*x = r.left;
*y = r.top;
} else {