Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10793 Modified Files: BitmapControl.cpp ColorButton.cpp ColorControl.cpp GBMapView.cpp MapView.cpp MemoryViewer.cpp PaletteViewControl.cpp ZoomControl.cpp Log Message: Patch from Forgotten: fix custom controls to use CS_GLOBALCLASS style and fix the GB map view flickering. Index: GBMapView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBMapView.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GBMapView.cpp 9 Mar 2004 01:46:23 -0000 1.4 --- GBMapView.cpp 18 Apr 2004 16:21:59 -0000 1.5 *************** *** 375,381 **** SIZE s; ! s.cx = mapView.GetScrollLimit(SB_HORZ); ! s.cy = mapView.GetScrollLimit(SB_VERT); ! if(s.cx != w || s.cy != h) { mapView.setSize(w, h); s.cx = w; --- 375,383 ---- SIZE s; ! if(mapView.getStretch()) { ! mapView.setSize(w, h); ! s.cx = s.cy = 1; ! mapView.SetScrollSizes(MM_TEXT, s); ! } else { mapView.setSize(w, h); s.cx = w; *************** *** 383,390 **** mapView.SetScrollSizes(MM_TEXT, s); } ! if(mapView.getStretch()) { ! s.cx = s.cy = 1; ! mapView.SetScrollSizes(MM_TEXT, s); ! } mapView.refresh(); } --- 385,389 ---- mapView.SetScrollSizes(MM_TEXT, s); } ! mapView.refresh(); } Index: ZoomControl.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/ZoomControl.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ZoomControl.cpp 17 Feb 2004 11:27:36 -0000 1.3 --- ZoomControl.cpp 18 Apr 2004 16:21:59 -0000 1.4 *************** *** 64,68 **** WNDCLASS wc; ZeroMemory(&wc, sizeof(wc)); ! wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)::DefWindowProc; wc.hInstance = AfxGetInstanceHandle(); --- 64,68 ---- WNDCLASS wc; ZeroMemory(&wc, sizeof(wc)); ! wc.style = CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS; wc.lpfnWndProc = (WNDPROC)::DefWindowProc; wc.hInstance = AfxGetInstanceHandle(); Index: MapView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MapView.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MapView.cpp 9 Mar 2004 01:46:23 -0000 1.5 --- MapView.cpp 18 Apr 2004 16:21:59 -0000 1.6 *************** *** 515,521 **** enableButtons(mode); SIZE s; ! s.cx = mapView.GetScrollLimit(SB_HORZ); ! s.cy = mapView.GetScrollLimit(SB_VERT); ! if(s.cx != w || s.cy != h) { mapView.setSize(w, h); s.cx = w; --- 515,524 ---- enableButtons(mode); SIZE s; ! ! if(mapView.getStretch()) { ! mapView.setSize(w, h); ! s.cx = s.cy = 1; ! mapView.SetScrollSizes(MM_TEXT, s); ! } else { mapView.setSize(w, h); s.cx = w; *************** *** 523,530 **** mapView.SetScrollSizes(MM_TEXT, s); } ! if(mapView.getStretch()) { ! s.cx = s.cy = 1; ! mapView.SetScrollSizes(MM_TEXT, s); ! } mapView.refresh(); --- 526,530 ---- mapView.SetScrollSizes(MM_TEXT, s); } ! mapView.refresh(); Index: PaletteViewControl.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/PaletteViewControl.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PaletteViewControl.cpp 17 Feb 2004 11:27:36 -0000 1.2 --- PaletteViewControl.cpp 18 Apr 2004 16:21:59 -0000 1.3 *************** *** 397,401 **** WNDCLASS wc; ZeroMemory(&wc, sizeof(wc)); ! wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)::DefWindowProc; wc.hInstance = AfxGetInstanceHandle(); --- 397,401 ---- WNDCLASS wc; ZeroMemory(&wc, sizeof(wc)); ! wc.style = CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS; wc.lpfnWndProc = (WNDPROC)::DefWindowProc; wc.hInstance = AfxGetInstanceHandle(); Index: ColorButton.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/ColorButton.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ColorButton.cpp 4 Nov 2003 14:09:52 -0000 1.1 --- ColorButton.cpp 18 Apr 2004 16:21:59 -0000 1.2 *************** *** 108,112 **** WNDCLASS wc; ZeroMemory(&wc, sizeof(wc)); ! wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)::DefWindowProc; wc.hInstance = AfxGetInstanceHandle(); --- 108,112 ---- WNDCLASS wc; ZeroMemory(&wc, sizeof(wc)); ! wc.style = CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS; wc.lpfnWndProc = (WNDPROC)::DefWindowProc; wc.hInstance = AfxGetInstanceHandle(); Index: ColorControl.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/ColorControl.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ColorControl.cpp 4 Nov 2003 14:09:52 -0000 1.1 --- ColorControl.cpp 18 Apr 2004 16:21:59 -0000 1.2 *************** *** 90,94 **** WNDCLASS wc; ZeroMemory(&wc, sizeof(wc)); ! wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)::DefWindowProc; wc.hInstance = AfxGetInstanceHandle(); --- 90,94 ---- WNDCLASS wc; ZeroMemory(&wc, sizeof(wc)); ! wc.style = CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS; wc.lpfnWndProc = (WNDPROC)::DefWindowProc; wc.hInstance = AfxGetInstanceHandle(); Index: BitmapControl.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/BitmapControl.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BitmapControl.cpp 17 Feb 2004 11:27:36 -0000 1.2 --- BitmapControl.cpp 18 Apr 2004 16:21:59 -0000 1.3 *************** *** 45,48 **** --- 45,51 ---- stretch = false; registerClass(); + CSize sizeTotal; + sizeTotal.cx = sizeTotal.cy = 0; + SetScrollSizes(MM_TEXT, sizeTotal); } *************** *** 254,258 **** WNDCLASS wc; ZeroMemory(&wc, sizeof(wc)); ! wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)::DefWindowProc; wc.hInstance = AfxGetInstanceHandle(); --- 257,261 ---- WNDCLASS wc; ZeroMemory(&wc, sizeof(wc)); ! wc.style = CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS; wc.lpfnWndProc = (WNDPROC)::DefWindowProc; wc.hInstance = AfxGetInstanceHandle(); Index: MemoryViewer.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MemoryViewer.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MemoryViewer.cpp 17 Feb 2004 11:27:36 -0000 1.5 --- MemoryViewer.cpp 18 Apr 2004 16:21:59 -0000 1.6 *************** *** 594,598 **** WNDCLASS wc; ZeroMemory(&wc, sizeof(wc)); ! wc.style = CS_PARENTDC | CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)::DefWindowProc; wc.hInstance = AfxGetInstanceHandle(); --- 594,598 ---- WNDCLASS wc; ZeroMemory(&wc, sizeof(wc)); ! wc.style = CS_PARENTDC | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS; wc.lpfnWndProc = (WNDPROC)::DefWindowProc; wc.hInstance = AfxGetInstanceHandle(); |