- Timestamp:
- Dec 17, 1999, 6:18:04 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/timer.cpp
r1418 r2099 1 /* $Id: timer.cpp,v 1. 6 1999-10-23 16:45:21cbratschi Exp $ */1 /* $Id: timer.cpp,v 1.7 1999-12-17 17:18:03 cbratschi Exp $ */ 2 2 3 3 /* … … 184 184 WinStopTimer (GetThreadHAB(), pTimer->PMhwnd, pTimer->PMid); 185 185 186 pTimer->inUse = TIMER::free; 187 pTimer->PMhwnd = 0; 188 pTimer->PMid = 0; 189 186 190 LeaveCriticalSection(); 187 191 … … 189 193 } 190 194 195 VOID TIMER_KillTimerFromWindow(HWND hwnd) 196 { 197 Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 198 int i; 199 TIMER * pTimer; 200 201 if (hwnd && !wnd) return; 202 203 EnterCriticalSection(); 204 205 for (i = 0, pTimer = TimersArray; i < NB_TIMERS; i++, pTimer++) 206 if (pTimer->inUse && pTimer->hwnd == hwnd) 207 { 208 pTimer->inUse = TIMER::free; 209 pTimer->PMhwnd = 0; 210 pTimer->PMid = 0; 211 } 212 213 LeaveCriticalSection(); 214 } 215 191 216 /*********************************************************************** 192 217 * SetTimer32 (USER32.511) -
trunk/src/user32/timer.h
r1418 r2099 1 /* $Id: timer.h,v 1. 2 1999-10-23 16:45:22cbratschi Exp $ */1 /* $Id: timer.h,v 1.3 1999-12-17 17:18:03 cbratschi Exp $ */ 2 2 /* 3 3 * public timer functions … … 13 13 #define __TIMER_H__ 14 14 15 #ifndef INCL_TIMERWIN32 15 16 extern BOOL TIMER_GetTimerInfo(HWND PMhwnd,ULONG PMid,PBOOL sys,PULONG id); 16 17 extern BOOL TIMER_HandleTimer (PQMSG pMsg); 18 #endif 19 extern VOID TIMER_KillTimerFromWindow(HWND hwnd); 17 20 18 21 #endif //__TIMER_H__ -
trunk/src/user32/win32wbase.cpp
r2089 r2099 1 /* $Id: win32wbase.cpp,v 1.11 2 1999-12-16 00:47:21 sandervlExp $ */1 /* $Id: win32wbase.cpp,v 1.113 1999-12-17 17:18:03 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 42 42 #include "winmouse.h" 43 43 #include <win\hook.h> 44 #define INCL_TIMERWIN32 45 #include "timer.h" 44 46 45 47 #define HAS_DLGFRAME(style,exStyle) \ … … 807 809 SendInternalMessageA(WM_DESTROY, 0, 0); 808 810 if(::IsWindow(hwnd) == FALSE) { 809 810 811 //object already destroyed, so return immediately 812 return 1; 811 813 } 812 814 SendInternalMessageA(WM_NCDESTROY, 0, 0); … … 814 816 if (hwndHorzScroll && OSLibWinQueryWindow(hwndHorzScroll,QWOS_PARENT) == OSLibWinQueryObjectWindow()) OSLibWinDestroyWindow(hwndHorzScroll); 815 817 if (hwndVertScroll && OSLibWinQueryWindow(hwndVertScroll,QWOS_PARENT) == OSLibWinQueryObjectWindow()) OSLibWinDestroyWindow(hwndVertScroll); 818 819 TIMER_KillTimerFromWindow(OS2Hwnd); 816 820 817 821 if(getFirstChild() == NULL) { … … 1989 1993 case WM_MBUTTONDOWN: 1990 1994 case WM_RBUTTONDOWN: 1991 NotifyParent(Msg, wParam, lParam); 1995 { 1996 if (getParent()) 1997 { 1998 POINTS pt = MAKEPOINTS(lParam); 1999 POINT point; 2000 2001 point.x = pt.x; 2002 point.y = pt.y; 2003 MapWindowPoints(getParent()->getWindowHandle(),Win32Hwnd,&point,1); 2004 NotifyParent(Msg,wParam,MAKELPARAM(point.x,point.y)); 2005 } 1992 2006 rc = win32wndproc(getWindowHandle(), Msg, wParam, lParam); 1993 2007 break; 2008 } 1994 2009 1995 2010 case WM_DESTROY: -
trunk/src/user32/win32wmdichild.cpp
r2084 r2099 1 /* $Id: win32wmdichild.cpp,v 1.1 2 1999-12-16 00:11:48 sandervlExp $ */1 /* $Id: win32wmdichild.cpp,v 1.13 1999-12-17 17:18:04 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 MDI Child Window Class for OS/2 … … 294 294 295 295 /* calculate placement */ 296 calcDefaultChildPos(client, client->incTotalCreated() , pos, 0);296 calcDefaultChildPos(client, client->incTotalCreated()-1, pos, 0); 297 297 298 298 if (cs->cx == CW_USEDEFAULT || !cs->cx) cs->cx = pos[1].x; -
trunk/src/user32/win32wmdiclient.cpp
r2084 r2099 1 /* $Id: win32wmdiclient.cpp,v 1.1 4 1999-12-16 00:11:48 sandervlExp $ */1 /* $Id: win32wmdiclient.cpp,v 1.15 1999-12-17 17:18:04 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 MDI Client Window Class for OS/2 … … 17 17 #include <win.h> 18 18 #include <stdlib.h> 19 #include <math.h> 19 20 #include <string.h> 20 21 #include <stdarg.h> … … 131 132 goto END; 132 133 133 #if 0134 134 case WM_MDICASCADE: 135 retvalue = MDICascade(w, ci); 136 goto END; 137 #endif 135 retvalue = cascade(wParam); 136 goto END; 138 137 139 138 case WM_MDICREATE: … … 159 158 goto END; 160 159 161 #if 0162 160 case WM_MDIICONARRANGE: 163 161 mdiFlags |= MDIF_NEEDUPDATE; 164 ArrangeIconicWindows( hwnd);162 ArrangeIconicWindows(Win32Hwnd); 165 163 sbRecalc = SB_BOTH+1; 166 SendMessageA( hwnd, WM_MDICALCCHILDSCROLL, 0,0L);164 SendMessageA(WM_MDICALCCHILDSCROLL,0,0L); 167 165 retvalue = 0; 168 166 goto END; 169 #endif170 167 171 168 case WM_MDIMAXIMIZE: … … 193 190 goto END; 194 191 195 #if 0196 192 case WM_MDITILE: 197 193 mdiFlags |= MDIF_NEEDUPDATE; 198 ShowScrollBar( hwnd,SB_BOTH,FALSE);199 MDITile(w, ci,wParam);194 ShowScrollBar(Win32Hwnd,SB_BOTH,FALSE); 195 tile(wParam); 200 196 mdiFlags &= ~MDIF_NEEDUPDATE; 201 197 retvalue = 0; … … 205 201 case WM_HSCROLL: 206 202 mdiFlags |= MDIF_NEEDUPDATE; 207 ScrollChildren( hwnd, message, wParam, lParam);203 ScrollChildren(Win32Hwnd, message, wParam, lParam); 208 204 mdiFlags &= ~MDIF_NEEDUPDATE; 209 205 retvalue = 0; 210 206 goto END; 211 #endif212 207 213 208 case WM_SETFOCUS: … … 258 253 break; 259 254 260 #if 0261 255 case WM_MDICALCCHILDSCROLL: 262 256 if( (mdiFlags & MDIF_NEEDUPDATE) && sbRecalc ) 263 257 { 264 CalcChildScroll( hwnd, sbRecalc-1);258 CalcChildScroll(Win32Hwnd, sbRecalc-1); 265 259 sbRecalc = 0; 266 260 mdiFlags &= ~MDIF_NEEDUPDATE; … … 268 262 retvalue = 0; 269 263 goto END; 270 #endif271 264 } 272 265 retvalue = DefWindowProcA(message, wParam, lParam ); … … 649 642 } 650 643 644 Win32BaseWindow** Win32MDIClientWindow::buildWindowArray(UINT bwaFlags,PUINT total) 645 { 646 Win32BaseWindow **list = NULL,*win32wnd,**pos; 647 UINT skipHidden; 648 DWORD skipFlags; 649 650 skipHidden = bwaFlags & BWA_SKIPHIDDEN; 651 skipFlags = (bwaFlags & BWA_SKIPDISABLED) ? WS_DISABLED : 0; 652 if (bwaFlags & BWA_SKIPICONIC) skipFlags |= WS_MINIMIZE; 653 654 /* First count the windows */ 655 *total = 0; 656 win32wnd = (Win32BaseWindow*)this->getFirstChild(); 657 while (win32wnd) 658 { 659 if (!(win32wnd->getStyle() & skipFlags) && (!skipHidden || (win32wnd->getStyle() & WS_VISIBLE))) 660 (*total)++; 661 win32wnd = (Win32BaseWindow*)win32wnd->getNextChild(); 662 } 663 664 if (*total) 665 { 666 /* Now build the list of all windows */ 667 list = (Win32BaseWindow**)HeapAlloc(GetProcessHeap(),0,sizeof(Win32BaseWindow*)*(*total+1)); 668 if (list) 669 { 670 for (win32wnd = (Win32BaseWindow*)this->getFirstChild(),pos = list;win32wnd;win32wnd = (Win32BaseWindow*)win32wnd->getNextChild()) 671 { 672 if ((win32wnd->getStyle() & skipFlags)); 673 else if(!skipHidden || win32wnd->getStyle() & WS_VISIBLE) 674 *pos++ = win32wnd; 675 } 676 *pos = NULL; 677 } 678 } 679 680 return list; 681 } 682 683 void Win32MDIClientWindow::releaseWindowArray(Win32BaseWindow **wndArray) 684 { 685 HeapFree(GetProcessHeap(),0,wndArray); 686 } 687 688 /********************************************************************** 689 * MDI_CalcDefaultChildPos 690 * 691 * It seems that the default height is about 2/3 of the client rect 692 */ 693 void Win32MDIClientWindow::calcDefaultChildPos(WORD n,LPPOINT lpPos,INT delta) 694 { 695 INT nstagger; 696 RECT rect = *this->getClientRect(); 697 INT spacing = GetSystemMetrics(SM_CYCAPTION) + 698 GetSystemMetrics(SM_CYFRAME) - 1; 699 700 if( rect.bottom - rect.top - delta >= spacing ) 701 rect.bottom -= delta; 702 703 nstagger = (rect.bottom - rect.top)/(3 * spacing); 704 lpPos[1].x = (rect.right - rect.left - nstagger * spacing); 705 lpPos[1].y = (rect.bottom - rect.top - nstagger * spacing); 706 lpPos[0].x = lpPos[0].y = spacing * (n%(nstagger+1)); 707 } 708 709 /********************************************************************** 710 * MDICascade 711 */ 712 BOOL Win32MDIClientWindow::cascade(UINT fuCascade) 713 { 714 Win32BaseWindow **list; 715 UINT total = 0; 716 717 if (getMaximizedChild()) 718 SendInternalMessageA(WM_MDIRESTORE, (WPARAM)getMaximizedChild()->getWindowHandle(), 0); 719 720 if (nActiveChildren == 0) return 0; 721 722 list = buildWindowArray(BWA_SKIPHIDDEN | BWA_SKIPOWNED | BWA_SKIPICONIC,&total); 723 if (list) 724 { 725 Win32BaseWindow** heapPtr = list; 726 if (total) 727 { 728 INT delta = 0,n = 0; 729 POINT pos[2]; 730 731 732 if (total < nActiveChildren) 733 delta = GetSystemMetrics(SM_CYICONSPACING)+GetSystemMetrics(SM_CYICON); 734 735 // walk the list (backwards) and move windows 736 while (*list) list++; 737 while (list != heapPtr) 738 { 739 list--; 740 741 calcDefaultChildPos(n++,pos,delta); 742 ::SetWindowPos((*list)->getWindowHandle(),0,pos[0].x,pos[0].y,pos[1].x,pos[1].y,SWP_DRAWFRAME | SWP_NOACTIVATE | SWP_NOZORDER); 743 } 744 } 745 releaseWindowArray(heapPtr); 746 } 747 748 if (total < nActiveChildren) 749 ArrangeIconicWindows(Win32Hwnd); 750 751 return TRUE; 752 } 753 754 /********************************************************************** 755 * MDITile 756 */ 757 BOOL Win32MDIClientWindow::tile(UINT fuTile) 758 { 759 Win32BaseWindow** list; 760 UINT total = 0; 761 762 if (getMaximizedChild()) 763 SendInternalMessageA(WM_MDIRESTORE, (WPARAM)getMaximizedChild()->getWindowHandle(), 0); 764 765 if (nActiveChildren == 0) return TRUE; 766 767 list = buildWindowArray(BWA_SKIPHIDDEN | BWA_SKIPOWNED | BWA_SKIPICONIC | 768 ((fuTile & MDITILE_SKIPDISABLED)? BWA_SKIPDISABLED : 0), &total ); 769 770 if (list) 771 { 772 Win32BaseWindow** heapPtr = list; 773 774 if (total) 775 { 776 RECT rect; 777 int x, y, xsize, ysize; 778 int rows, columns, r, c, i; 779 780 GetClientRect(Win32Hwnd,&rect); 781 rows = (int) sqrt((double)total); 782 columns = total / rows; 783 784 if( fuTile & MDITILE_HORIZONTAL ) // version >= 3.1 785 { 786 i = rows; 787 rows = columns; // exchange r and c 788 columns = i; 789 } 790 791 if( total != nActiveChildren) 792 { 793 y = rect.bottom - 2 * GetSystemMetrics(SM_CYICONSPACING) - GetSystemMetrics(SM_CYICON); 794 rect.bottom = ( y - GetSystemMetrics(SM_CYICON) < rect.top )? rect.bottom: y; 795 } 796 797 ysize = rect.bottom / rows; 798 xsize = rect.right / columns; 799 800 for (x = i = 0, c = 1; c <= columns && *list; c++) 801 { 802 if (c == columns) 803 { 804 rows = total - i; 805 ysize = rect.bottom / rows; 806 } 807 808 y = 0; 809 for (r = 1; r <= rows && *list; r++, i++) 810 { 811 ::SetWindowPos((*list)->getWindowHandle(), 0, x, y, xsize, ysize, 812 SWP_DRAWFRAME | SWP_NOACTIVATE | SWP_NOZORDER); 813 y += ysize; 814 list++; 815 } 816 x += xsize; 817 } 818 } 819 releaseWindowArray(heapPtr); 820 } 821 822 if( total < nActiveChildren ) ArrangeIconicWindows(Win32Hwnd); 823 824 return TRUE; 825 } 651 826 #if 0 652 /**********************************************************************653 * MDICascade654 */655 LONG Win32MDIClientWindow::cascade()656 {657 WND** ppWnd;658 UINT total;659 660 if (getMaximizedChild())661 SendInternalMessageA(WM_MDIRESTORE, (WPARAM)getMaximizedChild()->getWindowHandle(), 0);662 663 if (nActiveChildren == 0) return 0;664 665 if ((ppWnd = WIN_BuildWinArray(clientWnd, BWA_SKIPHIDDEN | BWA_SKIPOWNED |666 BWA_SKIPICONIC, &total)))667 {668 WND** heapPtr = ppWnd;669 if( total )670 {671 INT delta = 0, n = 0;672 POINT pos[2];673 if( total < ci->nActiveChildren )674 delta = GetSystemMetrics(SM_CYICONSPACING) +675 GetSystemMetrics(SM_CYICON);676 677 /* walk the list (backwards) and move windows */678 while (*ppWnd) ppWnd++;679 while (ppWnd != heapPtr)680 {681 ppWnd--;682 683 MDI_CalcDefaultChildPos(clientWnd, n++, pos, delta);684 SetWindowPos( (*ppWnd)->hwndSelf, 0, pos[0].x, pos[0].y,685 pos[1].x, pos[1].y,686 SWP_DRAWFRAME | SWP_NOACTIVATE | SWP_NOZORDER);687 }688 }689 WIN_ReleaseWinArray(heapPtr);690 }691 692 if( total < ci->nActiveChildren )693 ArrangeIconicWindows( clientWnd->hwndSelf );694 695 return 0;696 }697 698 /**********************************************************************699 * MDITile700 */701 void Win32MDIClientWindow::MDITile(WPARAM wParam )702 {703 WND** ppWnd;704 UINT total = 0;705 706 if (getMaximizedChild())707 SendInternalMessageA(WM_MDIRESTORE, (WPARAM)getMaximizedChild()->getWindowHandle(), 0);708 709 if (nActiveChildren == 0) return;710 711 ppWnd = WIN_BuildWinArray(wndClient, BWA_SKIPHIDDEN | BWA_SKIPOWNED | BWA_SKIPICONIC |712 ((wParam & MDITILE_SKIPDISABLED)? BWA_SKIPDISABLED : 0), &total );713 714 TRACE("%u windows to tile\n", total);715 716 if( ppWnd )717 {718 WND** heapPtr = ppWnd;719 720 if( total )721 {722 RECT rect;723 int x, y, xsize, ysize;724 int rows, columns, r, c, i;725 726 GetClientRect(wndClient->hwndSelf,&rect);727 rows = (int) sqrt((double)total);728 columns = total / rows;729 730 if( wParam & MDITILE_HORIZONTAL ) /* version >= 3.1 */731 {732 i = rows;733 rows = columns; /* exchange r and c */734 columns = i;735 }736 737 if( total != ci->nActiveChildren)738 {739 y = rect.bottom - 2 * GetSystemMetrics(SM_CYICONSPACING) - GetSystemMetrics(SM_CYICON);740 rect.bottom = ( y - GetSystemMetrics(SM_CYICON) < rect.top )? rect.bottom: y;741 }742 743 ysize = rect.bottom / rows;744 xsize = rect.right / columns;745 746 for (x = i = 0, c = 1; c <= columns && *ppWnd; c++)747 {748 if (c == columns)749 {750 rows = total - i;751 ysize = rect.bottom / rows;752 }753 754 y = 0;755 for (r = 1; r <= rows && *ppWnd; r++, i++)756 {757 SetWindowPos((*ppWnd)->hwndSelf, 0, x, y, xsize, ysize,758 SWP_DRAWFRAME | SWP_NOACTIVATE | SWP_NOZORDER);759 y += ysize;760 ppWnd++;761 }762 x += xsize;763 }764 }765 WIN_ReleaseWinArray(heapPtr);766 }767 768 if( total < ci->nActiveChildren ) ArrangeIconicWindows( wndClient->hwndSelf );769 }770 771 827 /* ----------------------- Frame window ---------------------------- */ 772 828 … … 912 968 } 913 969 #endif 970 971 /*********************************************************************** 972 * CalcChildScroll (USER.462) 973 */ 974 void WINAPI CalcChildScroll(HWND hwnd,WORD scroll) 975 { 976 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 977 SCROLLINFO info; 978 RECT childRect, clientRect; 979 INT vmin, vmax, hmin, hmax, vpos, hpos; 980 981 if (!win32wnd) return; 982 983 GetClientRect( hwnd, &clientRect ); 984 SetRectEmpty( &childRect ); 985 986 for (win32wnd = (Win32BaseWindow*)win32wnd->getFirstChild();win32wnd;win32wnd = (Win32BaseWindow*)win32wnd->getNextChild()) 987 { 988 if( win32wnd->getStyle() & WS_MAXIMIZE ) 989 { 990 ShowScrollBar(hwnd, SB_BOTH, FALSE); 991 return; 992 } 993 UnionRect(&childRect,win32wnd->getWindowRect(),&childRect); 994 } 995 UnionRect( &childRect, &clientRect, &childRect ); 996 997 hmin = childRect.left; hmax = childRect.right - clientRect.right; 998 hpos = clientRect.left - childRect.left; 999 vmin = childRect.top; vmax = childRect.bottom - clientRect.bottom; 1000 vpos = clientRect.top - childRect.top; 1001 1002 switch( scroll ) 1003 { 1004 case SB_HORZ: 1005 vpos = hpos; vmin = hmin; vmax = hmax; 1006 case SB_VERT: 1007 info.cbSize = sizeof(info); 1008 info.nMax = vmax; info.nMin = vmin; info.nPos = vpos; 1009 info.fMask = SIF_POS | SIF_RANGE; 1010 SetScrollInfo(hwnd, scroll, &info, TRUE); 1011 break; 1012 case SB_BOTH: 1013 { 1014 SCROLLINFO vInfo, hInfo; 1015 1016 vInfo.cbSize = hInfo.cbSize = sizeof(SCROLLINFO); 1017 vInfo.nMin = vmin; 1018 hInfo.nMin = hmin; 1019 vInfo.nMax = vmax; 1020 hInfo.nMax = hmax; 1021 vInfo.nPos = vpos; 1022 hInfo.nPos = hpos; 1023 vInfo.fMask = hInfo.fMask = SIF_RANGE | SIF_POS; 1024 1025 SetScrollInfo(hwnd,SB_VERT,&vInfo,TRUE); 1026 SetScrollInfo(hwnd,SB_HORZ,&hInfo,TRUE); 1027 } 1028 } 1029 } 1030 1031 /*********************************************************************** 1032 * ScrollChildren32 (USER32.448) 1033 */ 1034 void WINAPI ScrollChildren(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam) 1035 { 1036 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hWnd); 1037 INT newPos = -1; 1038 INT curPos, length, minPos, maxPos, shift; 1039 1040 if (!win32wnd) return; 1041 1042 if (uMsg == WM_HSCROLL) 1043 { 1044 GetScrollRange(hWnd,SB_HORZ,&minPos,&maxPos); 1045 curPos = GetScrollPos(hWnd,SB_HORZ); 1046 length = win32wnd->getWindowWidth()/2; 1047 shift = GetSystemMetrics(SM_CYHSCROLL); 1048 } else if (uMsg == WM_VSCROLL) 1049 { 1050 GetScrollRange(hWnd,SB_VERT,&minPos,&maxPos); 1051 curPos = GetScrollPos(hWnd,SB_VERT); 1052 length = win32wnd->getWindowHeight()/2; 1053 shift = GetSystemMetrics(SM_CXVSCROLL); 1054 } else return; 1055 1056 switch( wParam ) 1057 { 1058 case SB_LINEUP: 1059 newPos = curPos - shift; 1060 break; 1061 1062 case SB_LINEDOWN: 1063 newPos = curPos + shift; 1064 break; 1065 1066 case SB_PAGEUP: 1067 newPos = curPos - length; 1068 break; 1069 1070 case SB_PAGEDOWN: 1071 newPos = curPos + length; 1072 break; 1073 1074 case SB_THUMBPOSITION: 1075 newPos = LOWORD(lParam); 1076 break; 1077 1078 case SB_THUMBTRACK: 1079 return; 1080 1081 case SB_TOP: 1082 newPos = minPos; 1083 break; 1084 1085 case SB_BOTTOM: 1086 newPos = maxPos; 1087 break; 1088 1089 case SB_ENDSCROLL: 1090 CalcChildScroll(hWnd,(uMsg == WM_VSCROLL)?SB_VERT:SB_HORZ); 1091 return; 1092 } 1093 1094 if( newPos > maxPos ) 1095 newPos = maxPos; 1096 else 1097 if( newPos < minPos ) 1098 newPos = minPos; 1099 1100 SetScrollPos(hWnd, (uMsg == WM_VSCROLL)?SB_VERT:SB_HORZ , newPos, TRUE); 1101 1102 if( uMsg == WM_VSCROLL ) 1103 ScrollWindowEx(hWnd ,0 ,curPos - newPos, NULL, NULL, 0, NULL, 1104 SW_INVALIDATE | SW_ERASE | SW_SCROLLCHILDREN ); 1105 else 1106 ScrollWindowEx(hWnd ,curPos - newPos, 0, NULL, NULL, 0, NULL, 1107 SW_INVALIDATE | SW_ERASE | SW_SCROLLCHILDREN ); 1108 } 1109 914 1110 /* -------- Miscellaneous service functions ---------- 915 1111 * -
trunk/src/user32/win32wmdiclient.h
r1429 r2099 1 /* $Id: win32wmdiclient.h,v 1. 4 1999-10-24 12:30:29 sandervlExp $ */1 /* $Id: win32wmdiclient.h,v 1.5 1999-12-17 17:18:04 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 MDI Client Window Class for OS/2 … … 18 18 #define MDICLIENTCLASSNAMEW L"MDICLIENT" 19 19 20 #define MDIF_NEEDUPDATE 20 #define MDIF_NEEDUPDATE 0x0001 21 21 22 22 //****************************************************************************** … … 30 30 virtual BOOL isMDIClient(); 31 31 32 33 32 int incTotalCreated() { return ++nTotalCreated; }; 33 int getFirstChildId() { return idFirstChild; }; 34 34 35 35 HWND getMDIMenu() { return hWindowMenu; }; 36 36 37 37 Win32MDIChildWindow *getMaximizedChild() { return maximizedChild; }; … … 46 46 void postUpdate(WORD recalc); 47 47 48 49 50 48 int getNrOfChildren() { return nActiveChildren; }; 49 int incNrActiveChildren() { return ++nActiveChildren; }; 50 int decNrActiveChildren() { return --nActiveChildren; }; 51 51 52 52 int getMdiFlags() { return mdiFlags; }; 53 53 void setMdiFlags(int newflags) { mdiFlags = newflags; }; 54 54 55 55 void updateFrameText(BOOL repaint, LPCSTR lpTitle ); 56 56 57 57 LONG childActivate(Win32MDIChildWindow *child); 58 58 void switchActiveChild(Win32MDIChildWindow *nextActiveChild, BOOL bNextWindow ); 59 59 LRESULT destroyChild(Win32MDIChildWindow *child, BOOL flagDestroy ); 60 60 61 62 63 61 LRESULT setMDIMenu(HMENU hmenuFrame, HMENU hmenuWindow); 62 LRESULT refreshMDIMenu(HMENU hmenuFrame, HMENU hmenuWindow); 63 BOOL restoreFrameMenu(Win32BaseWindow *child); 64 64 65 65 LRESULT MDIClientWndProc(UINT message, WPARAM wParam, LPARAM lParam); 66 67 Win32BaseWindow** buildWindowArray(UINT bwaFlags,PUINT total); 68 void releaseWindowArray(Win32BaseWindow **wndArray); 69 void calcDefaultChildPos(WORD n,LPPOINT lpPos,INT delta); 70 BOOL cascade(UINT fuCascade); 71 BOOL tile(UINT fuTile); 66 72 67 73 private: … … 69 75 Win32MDIChildWindow *activeChild; 70 76 71 77 HWND hWindowMenu; 72 78 int idFirstChild; 73 79 74 int 75 int 76 77 LPSTR 78 DWORD 80 int nActiveChildren; 81 int nTotalCreated; 82 int sbRecalc; 83 LPSTR frameTitle; 84 DWORD mdiFlags; 79 85 80 86 };
Note:
See TracChangeset
for help on using the changeset viewer.