freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft] Bad window size in grwin32.c


From: Sebastien LEIX
Subject: [ft] Bad window size in grwin32.c
Date: Mon, 2 Apr 2007 11:15:19 +0200

Hi,

The computed window size is incorrect (at least under windows xp).
You use GetSystemMetrics, but the result is wrong : the right and the bottom
is cutted.

I fixed that with :

  RECT  WndRect;

  WndRect.left = 0;
  WndRect.top = 0;
  WndRect.right = bitmap->width;
  WndRect.bottom = bitmap->rows;
  AdjustWindowRect(&WndRect, WS_SYSMENU | WS_CAPTION, FALSE);

  surface->window = CreateWindow(
        /* LPCSTR lpszClassName;    */ "FreeTypeTestGraphicDriver",
        /* LPCSTR lpszWindowName;   */ "FreeType Test Graphic Driver",
        /* DWORD dwStyle;           */  WS_OVERLAPPED | WS_SYSMENU,
        /* int x;                   */  CW_USEDEFAULT,
        /* int y;                   */  CW_USEDEFAULT,
        /* int nWidth;              */  WndRect.right - WndRect.left,
        /* int nHeight;             */  WndRect.bottom - WndRect.top,
        /* HWND hwndParent;         */  HWND_DESKTOP,
        /* HMENU hmenu;             */  0,
        /* HINSTANCE hinst;         */  GetModuleHandle( NULL ),
        /* void FAR* lpvParam;      */  surface );

Regards

Sebastien





reply via email to

[Prev in Thread] Current Thread [Next in Thread]