source: trunk/src/user32/oslibwin.cpp@ 1010

Last change on this file since 1010 was 1010, checked in by dengert, 26 years ago

bad frame style corrected

File size: 22.9 KB
Line 
1/* $Id: oslibwin.cpp,v 1.4 1999-09-22 14:58:23 dengert Exp $ */
2/*
3 * Window API wrappers for OS/2
4 *
5 *
6 * Copyright 1999 Sander van Leeuwen (sandervl@xs4all.nl)
7 * Copyright 1999 Daniela Engert (dani@ngrt.de)
8 *
9 *
10 * Project Odin Software License can be found in LICENSE.TXT
11 *
12 */
13#define INCL_WIN
14#define INCL_PM
15#include <os2.h>
16#include <os2wrap.h>
17#include <stdlib.h>
18#include <string.h>
19
20#include <misc.h>
21#include "win32type.h"
22#include <winconst.h>
23#include "oslibwin.h"
24#include "oslibutil.h"
25#include "oslibmsg.h"
26#include "oslibgdi.h"
27#include "pmwindow.h"
28
29//******************************************************************************
30//******************************************************************************
31BOOL OSLibWinSetParent(HWND hwnd, HWND hwndParent, ULONG fRedraw)
32{
33 if(hwndParent == OSLIB_HWND_DESKTOP)
34 {
35 hwndParent = HWND_DESKTOP;
36 }
37
38 return (WinSetParent(hwnd, hwndParent, fRedraw) == 0);
39}
40//******************************************************************************
41//******************************************************************************
42HWND OSLibWinCreateWindow(HWND hwndParent, ULONG dwWinStyle, ULONG dwFrameStyle,
43 char *pszName, HWND Owner, ULONG fHWND_BOTTOM, HWND *hwndFrame)
44{
45 HWND hwndClient;
46
47 dprintf(("WinCreateWindow %x %x %x %s", hwndParent, dwWinStyle, dwFrameStyle, pszName));
48
49 if(pszName && *pszName == 0) {
50 pszName = NULL;
51 }
52 if(hwndParent == OSLIB_HWND_DESKTOP) {
53 hwndParent = HWND_DESKTOP;
54 }
55 if(Owner == OSLIB_HWND_DESKTOP) {
56 Owner = HWND_DESKTOP;
57 }
58
59 if(dwFrameStyle) {
60 ULONG dwClientStyle;
61
62 dwClientStyle = dwWinStyle & ~(WS_TABSTOP | WS_GROUP);
63 if(pszName)
64 dwFrameStyle |= FCF_TITLEBAR;
65
66 dwFrameStyle |= FCF_TASKLIST | FCF_NOMOVEWITHOWNER | FCF_NOBYTEALIGN;
67 dwWinStyle &= ~WS_CLIPCHILDREN;
68
69 *hwndFrame = WinCreateStdWindow(hwndParent, dwWinStyle,
70 &dwFrameStyle, WIN32_STDCLASS,
71 "", dwClientStyle, 0, 0, &hwndClient);
72 if(*hwndFrame) {
73 if(pszName) {
74 WinSetWindowText(*hwndFrame, pszName);
75 }
76 return hwndClient;
77 }
78 dprintf(("OSLibWinCreateWindow: WinCreateStdWindow failed (%x)", WinGetLastError(GetThreadHAB())));
79 return 0;
80 }
81 hwndClient = WinCreateWindow(hwndParent, WIN32_STDCLASS, pszName, dwWinStyle, 0, 0, 0, 0,
82 Owner, (fHWND_BOTTOM) ? HWND_BOTTOM :HWND_TOP, 0, NULL,
83 NULL);
84 *hwndFrame = hwndClient;
85 return hwndClient;
86}
87//******************************************************************************
88//******************************************************************************
89BOOL OSLibWinConvertStyle(ULONG dwStyle, ULONG dwExStyle, ULONG *OSWinStyle, ULONG *OSFrameStyle)
90{
91 *OSWinStyle = 0;
92 *OSFrameStyle = 0;
93
94 /* Window styles */
95 if(dwStyle & WS_MINIMIZE_W)
96 *OSWinStyle |= WS_MINIMIZED;
97//Done explicitely in CreateWindowExA
98#if 0
99 if(dwStyle & WS_VISIBLE_W)
100 *OSWinStyle |= WS_VISIBLE;
101#endif
102 if(dwStyle & WS_DISABLED_W)
103 *OSWinStyle |= WS_DISABLED;
104 if(dwStyle & WS_CLIPSIBLINGS_W)
105 *OSWinStyle |= WS_CLIPSIBLINGS;
106 if(dwStyle & WS_CLIPCHILDREN_W)
107 *OSWinStyle |= WS_CLIPCHILDREN;
108 if(dwStyle & WS_MAXIMIZE_W)
109 *OSWinStyle |= WS_MAXIMIZED;
110 if(dwStyle & WS_GROUP_W)
111 *OSWinStyle |= WS_GROUP;
112 if(dwStyle & WS_TABSTOP_W)
113 *OSWinStyle |= WS_TABSTOP;
114
115 if(dwStyle & WS_CAPTION_W)
116 *OSFrameStyle |= FCF_TITLEBAR;
117 if(dwStyle & WS_DLGFRAME_W)
118 *OSFrameStyle |= FCF_DLGBORDER;
119 else
120 if(dwStyle & WS_BORDER_W)
121 *OSFrameStyle |= FCF_BORDER;
122
123 if(dwStyle & WS_VSCROLL_W)
124 *OSFrameStyle |= FCF_VERTSCROLL;
125 if(dwStyle & WS_HSCROLL_W)
126 *OSFrameStyle |= FCF_HORZSCROLL;
127 if(dwStyle & WS_SYSMENU_W)
128 *OSFrameStyle |= FCF_SYSMENU;
129 if(dwStyle & WS_THICKFRAME_W)
130 *OSFrameStyle |= FCF_SIZEBORDER; //??
131 if(dwStyle & WS_MINIMIZEBOX_W)
132 *OSFrameStyle |= FCF_MINBUTTON;
133 if(dwStyle & WS_MAXIMIZEBOX_W)
134 *OSFrameStyle |= FCF_MAXBUTTON;
135
136 if(dwExStyle & WS_EX_DLGMODALFRAME_W)
137 *OSFrameStyle |= FCF_DLGBORDER;
138
139 return TRUE;
140}
141//******************************************************************************
142//******************************************************************************
143BOOL OSLibWinSetWindowULong(HWND hwnd, ULONG offset, ULONG value)
144{
145 return WinSetWindowULong(hwnd, offset, value);
146}
147//******************************************************************************
148//******************************************************************************
149ULONG OSLibWinGetWindowULong(HWND hwnd, ULONG offset)
150{
151 return WinQueryWindowULong(hwnd, offset);
152}
153//******************************************************************************
154//******************************************************************************
155BOOL OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam)
156{
157 return WinPostMsg(hwnd, msg, (MPARAM)wParam, (MPARAM)lParam);
158}
159//******************************************************************************
160//******************************************************************************
161ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam)
162{
163 return (ULONG)WinSendMsg(hwnd, msg, (MPARAM)wParam, (MPARAM)lParam);
164}
165//******************************************************************************
166//******************************************************************************
167//******************************************************************************
168//******************************************************************************
169BOOL OSLibWinAlarm(HWND hwndDeskTop,ULONG flStyle)
170{
171 return WinAlarm(hwndDeskTop,flStyle);
172}
173//******************************************************************************
174//******************************************************************************
175APIRET OSLibDosBeep(ULONG freg,ULONG dur)
176{
177 return DosBeep(freg,dur);
178}
179//******************************************************************************
180//******************************************************************************
181HWND OSLibWinQueryFocus(HWND hwndDeskTop)
182{
183 return WinQueryFocus(hwndDeskTop);
184}
185//******************************************************************************
186//******************************************************************************
187HWND OSLibWinWindowFromID(HWND hwndParent,ULONG id)
188{
189 return WinWindowFromID(hwndParent,id);
190}
191//******************************************************************************
192//******************************************************************************
193BOOL OSLibWinSetFocus(HWND hwndDeskTop,HWND hwndNewFocus, BOOL activate)
194{
195 return WinFocusChange (hwndDeskTop, hwndNewFocus, activate ? FC_NOLOSEACTIVE : 0);
196}
197//******************************************************************************
198//******************************************************************************
199BOOL OSLibWinIsChild (HWND hwnd, HWND hwndOf)
200{
201 return WinIsChild (hwnd, hwndOf);
202}
203//******************************************************************************
204//******************************************************************************
205ULONG OSLibGetWindowHeight(HWND hwnd)
206{
207 RECTL rect;
208
209 return (WinQueryWindowRect(hwnd,&rect)) ? rect.yTop-rect.yBottom:0;
210}
211//******************************************************************************
212//******************************************************************************
213LONG OSLibWinQuerySysValue(HWND hwndDeskTop,LONG iSysValue)
214{
215 return WinQuerySysValue(hwndDeskTop,iSysValue);
216}
217//******************************************************************************
218//******************************************************************************
219ULONG OSLibWinQueryDlgItemText(HWND hwndDlg,ULONG idItem,LONG cchBufferMax,char* pchBuffer)
220{
221 return WinQueryDlgItemText(hwndDlg,idItem,cchBufferMax,pchBuffer);
222}
223//******************************************************************************
224//******************************************************************************
225BOOL OSLibWinSetDlgItemText(HWND hwndDlg,ULONG idItem,char* pszText)
226{
227 return WinSetDlgItemText(hwndDlg,idItem,pszText);
228}
229//******************************************************************************
230//******************************************************************************
231BOOL OSLibWinQueryPointerPos(HWND hwndDeskTop,PPOINT pptlPoint)
232{
233 return WinQueryPointerPos(hwndDeskTop,(PPOINTL)pptlPoint);
234}
235//******************************************************************************
236//******************************************************************************
237HWND OSLibWinQueryWindow(HWND hwnd, ULONG lCode)
238{
239 return WinQueryWindow(hwnd, lCode);
240}
241//******************************************************************************
242//******************************************************************************
243BOOL OSLibWinSetWindowPos(HWND hwnd, HWND hwndInsertBehind, LONG x, LONG y, LONG cx,
244 LONG cy, ULONG fl)
245{
246 HWND hwndParent = hwndInsertBehind;
247 BOOL rc;
248
249 if(fl & SWP_MOVE) {
250 switch(hwndParent)
251 {
252 case HWNDOS_TOP:
253 case HWNDOS_BOTTOM:
254 hwndParent = HWND_DESKTOP;
255 break;
256 }
257 y = MapOS2ToWin32Y(hwndParent, cy, y);
258 }
259 rc = WinSetWindowPos(hwnd, hwndInsertBehind, x, y, cx, cy, fl);
260 dprintf(("WinSetWindowPos %x %x %d %d %d %d %x returned %d (%x)", hwnd, hwndInsertBehind, x, y, cx, cy, fl, rc, WinGetLastError(GetThreadHAB())));
261 return rc;
262}
263//******************************************************************************
264//******************************************************************************
265BOOL OSLibWinSetMultWindowPos(PSWP pswp, ULONG num)
266{
267 return WinSetMultWindowPos(GetThreadHAB(), pswp, num);
268}
269//******************************************************************************
270//******************************************************************************
271BOOL OSLibWinShowWindow(HWND hwnd, ULONG fl)
272{
273 BOOL rc;
274
275 if(fl & SWP_SHOW) {
276 rc = WinShowWindow(hwnd, TRUE);
277 }
278 if(rc == 0)
279 dprintf(("WinShowWindow %x failed %x", hwnd, WinGetLastError(GetThreadHAB())));
280 rc = WinSetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, fl);
281 if(rc == 0)
282 dprintf(("WinShowWindow %x failed %x", hwnd, WinGetLastError(GetThreadHAB())));
283 return rc;
284}
285//******************************************************************************
286//******************************************************************************
287BOOL OSLibWinDestroyWindow(HWND hwnd)
288{
289 return WinDestroyWindow(hwnd);
290}
291//******************************************************************************
292//******************************************************************************
293BOOL OSLibWinQueryWindowRect(HWND hwnd, PRECT pRect, int RelativeTo)
294{
295 BOOL rc;
296 RECTLOS2 rectl;
297
298 rc = WinQueryWindowRect(hwnd, (PRECTL)&rectl);
299 if(rc) {
300 if(RelativeTo == RELATIVE_TO_SCREEN) {
301 MapOS2ToWin32Rectl(OSLIB_HWND_DESKTOP, hwnd, &rectl, pRect);
302 }
303 else MapOS2ToWin32Rectl(&rectl, pRect);
304 }
305 else memset(pRect, 0, sizeof(RECT));
306 return rc;
307}
308//******************************************************************************
309//******************************************************************************
310BOOL OSLibWinIsIconic(HWND hwnd)
311{
312 SWP swp;
313 BOOL rc;
314
315 rc = WinQueryWindowPos(hwnd, &swp);
316 if(rc == FALSE) {
317 dprintf(("OSLibWinIsIconic: WinQueryWindowPos %x failed", hwnd));
318 return FALSE;
319 }
320
321 if(swp.fl & SWP_MINIMIZE)
322 return TRUE;
323 else return FALSE;
324}
325//******************************************************************************
326//******************************************************************************
327BOOL OSLibWinSetActiveWindow(HWND hwnd)
328{
329 return WinSetActiveWindow(HWND_DESKTOP, hwnd);
330}
331//******************************************************************************
332//******************************************************************************
333BOOL OSLibWinSetFocus(HWND hwnd)
334{
335 return WinSetFocus(HWND_DESKTOP, hwnd);
336}
337//******************************************************************************
338//******************************************************************************
339BOOL OSLibWinEnableWindow(HWND hwnd, BOOL fEnable)
340{
341 return WinEnableWindow(hwnd, fEnable);
342}
343//******************************************************************************
344//******************************************************************************
345BOOL OSLibWinIsWindowEnabled(HWND hwnd)
346{
347 return WinIsWindowEnabled(hwnd);
348}
349//******************************************************************************
350//******************************************************************************
351BOOL OSLibWinIsWindowVisible(HWND hwnd)
352{
353 return WinIsWindowVisible(hwnd);
354}
355//******************************************************************************
356//******************************************************************************
357BOOL OSLibWinQueryActiveWindow()
358{
359 return WinQueryActiveWindow(HWND_DESKTOP);
360}
361//******************************************************************************
362//******************************************************************************
363LONG OSLibWinQueryWindowTextLength(HWND hwnd)
364{
365 return WinQueryWindowTextLength(hwnd);
366}
367//******************************************************************************
368//******************************************************************************
369LONG OSLibWinQueryWindowText(HWND hwnd, LONG length, LPSTR lpsz)
370{
371 return WinQueryWindowText(hwnd, length, lpsz);
372}
373//******************************************************************************
374//******************************************************************************
375BOOL OSLibWinSetWindowText(HWND hwnd, LPSTR lpsz)
376{
377 return WinSetWindowText(hwnd, lpsz);
378}
379//******************************************************************************
380//******************************************************************************
381BOOL OSLibWinFlashWindow(HWND hwnd, BOOL fFlash)
382{
383 return WinFlashWindow(hwnd, fFlash);
384}
385//******************************************************************************
386//******************************************************************************
387HWND OSLibWinWindowFromPoint(HWND hwnd, PVOID ppoint)
388{
389 return WinWindowFromPoint((hwnd == OSLIB_HWND_DESKTOP) ? HWND_DESKTOP : hwnd, (PPOINTL)ppoint, TRUE);
390}
391//******************************************************************************
392//******************************************************************************
393BOOL OSLibWinMinimizeWindow(HWND hwnd)
394{
395 return WinSetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_MINIMIZE);
396}
397//******************************************************************************
398//******************************************************************************
399BOOL OSLibWinGetBorderSize(HWND hwnd, OSLIBPOINT *pointl)
400{
401 pointl->x = 0;
402 pointl->y = 0;
403 return (BOOL) WinSendMsg(hwnd, WM_QUERYBORDERSIZE, MPFROMP( &pointl), 0);
404}
405//******************************************************************************
406//******************************************************************************
407BOOL OSLibWinSetIcon(HWND hwnd, HANDLE hIcon)
408{
409 return (BOOL) WinSendMsg(hwnd, WM_SETICON, (MPARAM)hIcon, 0);
410}
411//******************************************************************************
412//******************************************************************************
413BOOL OSLibWinQueryWindowPos (HWND hwnd, PSWP pswp)
414{
415 return WinQueryWindowPos(hwnd, pswp);
416}
417//******************************************************************************
418//******************************************************************************
419void OSLibMapSWPtoWINDOWPOS(PSWP pswp, PWINDOWPOS pwpos, PSWP pswpOld, HWND hParent, HWND hFrame)
420{
421 HWND hWindow = pswp->hwnd;
422 HWND hWndInsertAfter = pswp->hwndInsertBehind;
423 long x = pswp->x;
424 long y = pswp->y;
425 long cx = pswp->cx;
426 long cy = pswp->cy;
427 UINT fuFlags = (UINT)pswp->fl;
428 ULONG parentHeight;
429
430 HWND hWinAfter;
431 ULONG flags = 0;
432
433 HWND hWnd = (hWindow == HWND_DESKTOP) ? HWND_DESKTOP_W: hWindow;
434
435 if (hWndInsertAfter == HWND_TOP)
436 hWinAfter = HWND_TOP_W;
437 else if (hWndInsertAfter == HWND_BOTTOM)
438 hWinAfter = HWND_BOTTOM_W;
439 else
440 hWinAfter = (HWND) hWndInsertAfter;
441
442 //***********************************
443 // convert PM flags to Windows flags
444 //***********************************
445 if (!(fuFlags & SWP_SIZE)) flags |= SWP_NOSIZE_W;
446 if (!(fuFlags & SWP_MOVE)) flags |= SWP_NOMOVE_W;
447 if (!(fuFlags & SWP_ZORDER)) flags |= SWP_NOZORDER_W;
448 if ( fuFlags & SWP_NOREDRAW) flags |= SWP_NOREDRAW_W;
449 if (!(fuFlags & SWP_ACTIVATE)) flags |= SWP_NOACTIVATE_W;
450 if ( fuFlags & SWP_SHOW) flags |= SWP_SHOWWINDOW_W;
451 if ( fuFlags & SWP_HIDE) flags |= SWP_HIDEWINDOW_W;
452
453 if (fuFlags & (SWP_MOVE | SWP_SIZE))
454 {
455 if (hParent == NULLHANDLE)
456 {
457 ULONG Offset;
458 POINTL pt = {0, 0};
459
460 Offset = OSLibGetWindowHeight(hFrame) - cy;
461 parentHeight = ScreenHeight;
462
463 cx += 2 * x;
464 cy += Offset;
465 WinMapWindowPoints (hFrame, HWND_DESKTOP, &pt, 1);
466 x = pt.x;
467 y = pt.y;
468
469 pswpOld->cx += 2 * pswpOld->x;
470 pswpOld->cy += Offset;
471 pswpOld->x = pt.x;
472 pswpOld->y = pt.y;
473 }
474 else
475 {
476 parentHeight = OSLibGetWindowHeight(hParent);
477 }
478
479 if (fuFlags & SWP_SIZE)
480 {
481 if (cy != pswpOld->cy)
482 {
483 flags &= ~SWP_NOMOVE_W;
484 }
485 }
486 else
487 {
488 cx = pswpOld->cx;
489 cy = pswpOld->cy;
490 }
491
492 if ((fuFlags & SWP_MOVE) == 0)
493 {
494 x = pswpOld->x;
495 y = pswpOld->y;
496 }
497
498 y = parentHeight - y - cy;
499 LONG oldY = parentHeight - pswpOld->y - pswpOld->cy;
500
501 if ((pswpOld->x == x) && (oldY == y))
502 flags |= SWP_NOMOVE_W;
503
504 if ((pswpOld->cx == cx) && (pswpOld->cy == cy))
505 flags |= SWP_NOSIZE_W;
506 }
507
508 if (hParent == NULLHANDLE)
509 {
510 pswpOld->x = x + pswp->x;
511 pswpOld->y = y + cy - pswp->y - pswp->cy;
512 }
513 else {
514 pswpOld->x = pswp->x;
515 pswpOld->y = parentHeight - pswp->y - cy;
516 }
517 pswpOld->cx = pswp->cx;
518 pswpOld->cy = pswp->cy;
519
520dprintf(("window (%d,%d)(%d,%d) client (%d,%d)(%d,%d)",
521 x,y,cx,cy, pswpOld->x,pswpOld->y,pswpOld->cx,pswpOld->cy));
522
523 pwpos->flags = (UINT)flags;
524 pwpos->cy = (int)cy;
525 pwpos->cx = (int)cx;
526 pwpos->x = (int)x;
527 pwpos->y = (int)y;
528 pwpos->hwndInsertAfter = hWinAfter;
529 pwpos->hwnd = hWindow;
530}
531//******************************************************************************
532//******************************************************************************
533void OSLibMapWINDOWPOStoSWP(PWINDOWPOS pwpos, PSWP pswp, PSWP pswpOld, HWND hParent, HWND hFrame)
534{
535 HWND hWnd = pwpos->hwnd;
536 HWND hWndInsertAfter = pwpos->hwndInsertAfter;
537 long x = pwpos->x;
538 long y = pwpos->y;
539 long cx = pwpos->cx;
540 long cy = pwpos->cy;
541 UINT fuFlags = pwpos->flags;
542 ULONG parentHeight;
543
544 HWND hWinAfter;
545 ULONG flags = 0;
546 HWND hWindow = hWnd ? (HWND)hWnd : HWND_DESKTOP;
547
548 if (hWndInsertAfter == HWND_TOPMOST_W)
549// hWinAfter = HWND_TOPMOST;
550 hWinAfter = HWND_TOP;
551 else if (hWndInsertAfter == HWND_NOTOPMOST_W)
552// hWinAfter = HWND_NOTOPMOST;
553 hWinAfter = HWND_TOP;
554 else if (hWndInsertAfter == HWND_TOP_W)
555 hWinAfter = HWND_TOP;
556 else if (hWndInsertAfter == HWND_BOTTOM_W)
557 hWinAfter = HWND_BOTTOM;
558 else
559 hWinAfter = (HWND) hWndInsertAfter;
560
561 if (!(fuFlags & SWP_NOSIZE_W )) flags |= SWP_SIZE;
562 if (!(fuFlags & SWP_NOMOVE_W )) flags |= SWP_MOVE;
563 if (!(fuFlags & SWP_NOZORDER_W )) flags |= SWP_ZORDER;
564 if ( fuFlags & SWP_NOREDRAW_W ) flags |= SWP_NOREDRAW;
565 if (!(fuFlags & SWP_NOACTIVATE_W)) flags |= SWP_ACTIVATE;
566 if ( fuFlags & SWP_SHOWWINDOW_W) flags |= SWP_SHOW;
567 if ( fuFlags & SWP_HIDEWINDOW_W) flags |= SWP_HIDE;
568
569 if (flags & (SWP_MOVE | SWP_SIZE))
570 {
571 if (hParent == NULLHANDLE)
572 parentHeight = ScreenHeight;
573 else
574 parentHeight = OSLibGetWindowHeight(hParent);
575
576 if ((flags & SWP_MOVE) == 0)
577 {
578 x = pswpOld->x;
579 y = pswpOld->y;
580
581 if (!((y == 0) && (pswpOld->cy == 0)))
582 {
583 y = parentHeight - y - pswpOld->cy;
584 }
585 }
586
587 if (flags & SWP_SIZE)
588 {
589 if (cy != pswpOld->cy)
590 flags |= SWP_MOVE;
591 }
592 else
593 {
594 cx = pswpOld->cx;
595 cy = pswpOld->cy;
596 }
597
598 y = parentHeight - y - cy;
599
600 if ((pswpOld->x == x) && (pswpOld->y == y))
601 flags &= ~SWP_MOVE;
602
603 if ((pswpOld->cx == cx) && (pswpOld->cy == cy))
604 flags &= ~SWP_SIZE;
605 }
606
607 pswp->fl = flags;
608 pswp->cy = cy;
609 pswp->cx = cx;
610 pswp->x = x;
611 pswp->y = y;
612 pswp->hwndInsertBehind = hWinAfter;
613 pswp->hwnd = hWindow;
614 pswp->ulReserved1 = 0;
615 pswp->ulReserved2 = 0;
616}
617//******************************************************************************
618//******************************************************************************
619HWND OSLibWinBeginEnumWindows(HWND hwnd)
620{
621 if(hwnd == OSLIB_HWND_DESKTOP) hwnd = HWND_DESKTOP;
622 else
623 if(hwnd == OSLIB_HWND_OBJECT) hwnd = HWND_OBJECT;
624
625 return WinBeginEnumWindows(hwnd);
626}
627//******************************************************************************
628//******************************************************************************
629HWND OSLibWinGetNextWindow(HWND hwndEnum)
630{
631 return WinGetNextWindow(hwndEnum);
632}
633//******************************************************************************
634//******************************************************************************
635HWND OSLibWinQueryClientWindow(HWND hwndFrame)
636{
637 HWND hwndClient = 0;
638
639 if(((ULONG)WinSendMsg(hwndFrame, WM_QUERYFRAMEINFO, NULL, NULL)) & FI_FRAME)
640 hwndClient = WinWindowFromID(hwndFrame, FID_CLIENT);
641
642 return hwndClient;
643}
644//******************************************************************************
645//******************************************************************************
646BOOL OSLibWinEndEnumWindows(HWND hwndEnum)
647{
648 return WinEndEnumWindows(hwndEnum);
649}
650//******************************************************************************
651//******************************************************************************
652BOOL OSLibWinQueryWindowProcess(HWND hwnd, ULONG *pid, ULONG *tid)
653{
654 return WinQueryWindowProcess(hwnd, pid, tid);
655}
656//******************************************************************************
657//******************************************************************************
Note: See TracBrowser for help on using the repository browser.