From: Enlightenment C. <no...@cv...> - 2007-05-28 08:03:53
|
Enlightenment CVS committal Author : doursse Project : e17 Module : test Dir : e17/test/orig/evas Modified Files: evas_software_ddraw_main.c Log Message: CreateWindow creates a window whose size takes into account the client area + the title bar + the borders. Call AdjustWindowRect before to get rid of that =================================================================== RCS file: /cvs/e/e17/test/orig/evas/evas_software_ddraw_main.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- evas_software_ddraw_main.c 27 May 2007 10:53:47 -0000 1.1 +++ evas_software_ddraw_main.c 28 May 2007 08:03:50 -0000 1.2 @@ -141,6 +141,7 @@ main(int argc, char **argv) { WNDCLASS wc; + RECT rect; HINSTANCE hinstance; MSG msg; HWND window; @@ -166,12 +167,18 @@ if(!RegisterClass(&wc)) return EXIT_FAILURE; + rect.left = 0; + rect.top = 0; + rect.right = win_w; + rect.bottom = win_h; + AdjustWindowRect (&rect, WS_OVERLAPPEDWINDOW | WS_SIZEBOX, FALSE); + window = CreateWindowEx(0, "Evas_Software_DDraw_Test", "Evas_Software_DDraw_Test", WS_OVERLAPPEDWINDOW | WS_SIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, - win_w, win_h, + rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, hinstance, NULL); if (!window) return EXIT_FAILURE; |