source: trunk/src/user32/new/wingdi.cpp@ 378

Last change on this file since 378 was 378, checked in by cbratschi, 26 years ago

BeginPaint() fix

File size: 2.6 KB
Line 
1/* $Id: wingdi.cpp,v 1.5 1999-07-23 19:09:26 cbratschi Exp $ */
2/*
3 * Win32 Window graphics apis for OS/2
4 *
5 *
6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
7 *
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 */
12#include <os2win.h>
13#include <misc.h>
14
15#include <win32wnd.h>
16#include <oslibwin.h>
17#include <oslibgdi.h>
18
19//******************************************************************************
20//TODO: Not complete
21//******************************************************************************
22HDC WIN32API BeginPaint(HWND hwnd, PPAINTSTRUCT lps)
23{
24 Win32Window *window;
25
26 window = Win32Window::GetWindowFromHandle(hwnd);
27 if(!window) {
28 dprintf(("GetDC, window %x not found", hwnd));
29 return 0;
30 }
31 dprintf(("BeginPaint %X\n", hwnd));
32 return O32_BeginPaint(window->getOS2WindowHandle(),lps);
33 //CB: conflict with Open32 mechanism
34 //lps->hdc = OSLibWinBeginPaint(window->getOS2WindowHandle(), &lps->rcPaint);
35
36 return lps->hdc;
37}
38//******************************************************************************
39//******************************************************************************
40BOOL WIN32API EndPaint(HWND hwnd, const PAINTSTRUCT *lps)
41{
42 dprintf(("EndPaint %x\n", hwnd));
43 return O32_EndPaint(hwnd,lps);
44 //CB: dito
45 //return OSLibWinEndPaint(lps->hdc);
46}
47//******************************************************************************
48//TODO: PARENT_DC flag
49//******************************************************************************
50HDC WIN32API GetDC(HWND hwnd)
51{
52 Win32Window *window;
53
54 window = Win32Window::GetWindowFromHandle(hwnd);
55 if(!window) {
56 dprintf(("GetDC, window %x not found", hwnd));
57 return 0;
58 }
59 dprintf(("GetDC %x", hwnd));
60 return O32_GetDC(window->getOS2WindowHandle());
61 //return OSLibWinGetPS(window->getOS2WindowHandle());
62}
63//******************************************************************************
64//TODO
65//******************************************************************************
66HDC WIN32API GetDCEx(HWND hwnd, HRGN arg2, DWORD arg3)
67{
68#ifdef DEBUG
69 WriteLog("USER32: GetDCEx NOT CORRECT!\n");
70#endif
71 return GetDC(hwnd);
72}
73//******************************************************************************
74//******************************************************************************
75int WIN32API ReleaseDC(HWND hwnd, HDC hdc)
76{
77 return O32_ReleaseDC(hwnd,hdc);
78 //return OSLibWinReleasePS(hdc);
79}
80//******************************************************************************
81//******************************************************************************
Note: See TracBrowser for help on using the repository browser.