Changeset 9933 for trunk/src/user32/win32wbase.cpp
- Timestamp:
- Mar 22, 2003, 9:27:12 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbase.cpp
r9930 r9933 1 /* $Id: win32wbase.cpp,v 1.36 2 2003-03-20 13:20:45sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.363 2003-03-22 20:27:12 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 119 119 fEraseBkgndFlag = TRUE; 120 120 fIsDragDropActive= FALSE; 121 fDirtyUpdateRegion = FALSE; 121 122 122 123 state = STATE_INIT; … … 174 175 hWindowRegion = 0; 175 176 hClipRegion = 0; 177 hUpdateRegion = 0; 176 178 177 179 hTaskList = 0; … … 272 274 if(propertyList) { 273 275 removeWindowProps(); 276 } 277 if(hUpdateRegion) { 278 DeleteObject(hUpdateRegion); 279 hUpdateRegion = NULL; 274 280 } 275 281 } … … 1190 1196 else 1191 1197 return SendMessageA(getWindowHandle(),WM_PAINT, 0, 0); 1198 } 1199 //****************************************************************************** 1200 // 1201 // Win32BaseWindow::saveAndValidateUpdateRegion 1202 // 1203 // If an application doesn't validate the update region while processing 1204 // WM_PAINT, then we must remember it for the next time. Also validates 1205 // the current update region. 1206 // 1207 // Parameters: 1208 // Returns: 1209 // 1210 // NOTE: 1211 // Windows will only send a WM_PAINT once until another part of the 1212 // window is invalidated. Unfortunately PM keeps on sending 1213 // WM_PAINT messages until we validate the update region. 1214 // 1215 // This affects UpdateWindow, RedrawWindow, GetUpdateRgn, GetUpdateRect, 1216 // BeginPaint and the next WM_PAINT message. 1217 // 1218 //****************************************************************************** 1219 void Win32BaseWindow::saveAndValidateUpdateRegion() 1220 { 1221 if(hUpdateRegion == NULL) { 1222 hUpdateRegion = ::CreateRectRgn(0, 0, 1, 1); 1223 } 1224 1225 dprintf(("Win32BaseWindow::saveAndValidateUpdateRegion; marked dirty!")); 1226 1227 //save update region 1228 ::GetUpdateRgn(getWindowHandle(), hUpdateRegion, FALSE); 1229 1230 //and validate it so PM won't bother us again 1231 ::ValidateRgn(getWindowHandle(), hUpdateRegion); 1232 1233 //we just pretend the entire window is invalid. easier this way 1234 fDirtyUpdateRegion = TRUE; 1235 } 1236 //****************************************************************************** 1237 // 1238 // Win32BaseWindow::checkForDirtyUpdateRegion 1239 // 1240 // If an application doesn't validate the update region while processing 1241 // WM_PAINT, then we must remember it for the next time. If the window has 1242 // a dirty update region, then invalidate that region. 1243 // 1244 // Parameters: 1245 // Returns: 1246 // 1247 // NOTE: 1248 // 1249 //****************************************************************************** 1250 void Win32BaseWindow::checkForDirtyUpdateRegion() 1251 { 1252 if(fDirtyUpdateRegion) { 1253 dprintf(("Win32BaseWindow::checkForDirtyUpdateRegion; marked dirty -> invalidate whole window!")); 1254 fDirtyUpdateRegion = FALSE; 1255 ::InvalidateRgn(getWindowHandle(), hUpdateRegion, TRUE); 1256 } 1192 1257 } 1193 1258 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.