Changeset 10060 for trunk/src/user32/win32wbase.cpp
- Timestamp:
- May 2, 2003, 5:33:17 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbase.cpp
r10045 r10060 1 /* $Id: win32wbase.cpp,v 1.3 69 2003-04-28 08:41:08sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.370 2003-05-02 15:33:16 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 199 199 200 200 pfnOldPMWndProc = NULL; 201 202 memset(hdcWindow, 0, sizeof(hdcWindow)); 203 nrOpenDCs = 0; 201 204 } 202 205 //****************************************************************************** … … 4078 4081 lpVisRgnNotifyProc(getWindowHandle(), fDrawingAllowed, dwVisRgnNotifyParam); 4079 4082 } 4083 } 4084 //****************************************************************************** 4085 // Win32BaseWindow::queryOpenDCs 4086 // 4087 // Return the DCs that are currently open for this window 4088 // 4089 // Parameters: 4090 // HDC *phdcWindow - pointer to HDC array (IN) 4091 // int chdcWindow - size of HDC array (IN) 4092 // int *pnrdcs - number of HDCs returned (OUT) 4093 // 4094 // Returns: 4095 // TRUE - Success 4096 // FALSE - Failure 4097 // 4098 //****************************************************************************** 4099 BOOL Win32BaseWindow::queryOpenDCs(HDC *phdcWindow, int chdcWindow, int *pnrdcs) 4100 { 4101 if(nrOpenDCs == 0) return FALSE; 4102 4103 if(chdcWindow < nrOpenDCs) { 4104 DebugInt3(); 4105 return FALSE; 4106 } 4107 4108 int j = 0; 4109 for(int i=0;i<MAX_OPENDCS && j<nrOpenDCs;i++) { 4110 if(hdcWindow[i] != 0) { 4111 phdcWindow[j] = hdcWindow[i]; 4112 j++; 4113 } 4114 } 4115 *pnrdcs = nrOpenDCs; 4116 return TRUE; 4117 } 4118 //****************************************************************************** 4119 // Win32BaseWindow::addOpenDC 4120 // 4121 // Add DC to list of open DCS 4122 // 4123 // Parameters: 4124 // HDC hdc - HDC to be added to our list of open DCs 4125 // 4126 // Returns: 4127 // 4128 //****************************************************************************** 4129 void Win32BaseWindow::addOpenDC(HDC hdc) 4130 { 4131 for(int i=0;i<MAX_OPENDCS;i++) { 4132 if(hdcWindow[i] == 0) { 4133 hdcWindow[i] = hdc; 4134 break; 4135 } 4136 } 4137 if(i == MAX_OPENDCS) { 4138 DebugInt3(); //no room! 4139 return; 4140 } 4141 4142 nrOpenDCs++; 4143 } 4144 //****************************************************************************** 4145 // Win32BaseWindow::removeOpenDC 4146 // 4147 // Remove DC from list of open DCS 4148 // 4149 // Parameters: 4150 // HDC hdc - HDC to be removed from our list of open DCs 4151 // 4152 // Returns: 4153 // 4154 //****************************************************************************** 4155 void Win32BaseWindow::removeOpenDC(HDC hdc) 4156 { 4157 if(nrOpenDCs == 0) { 4158 DebugInt3(); 4159 return; 4160 } 4161 for(int i=0;i<MAX_OPENDCS;i++) { 4162 if(hdcWindow[i] == hdc) { 4163 hdcWindow[i] = 0; 4164 break; 4165 } 4166 } 4167 if(i == MAX_OPENDCS) { 4168 DebugInt3(); //not found 4169 return; 4170 } 4171 nrOpenDCs--; 4080 4172 } 4081 4173 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.