RE: EuGrid Version 1.0.1
- Posted by Phil Russell <pg_russell at lineone.net> Sep 18, 2002
- 522 views
Hi Andy, Thanks for taking a look - all feedback gratefully received! > > I have noticed that sometimes when running a program with a EuGrid, some > > other fonts in my system sometimes get messed up (they get bigger & > bolder). This generally happens to fonts in the menu bar and in the > address bar (where the filename is) in the desktop explorer. Problem > goes away by simply reopening the affected window. I have seen this > maybe once or twice before using win32lib programs without EuGrid, but > with EuGrid it seems to happen quite frequently -- generally when I'm > actually programming and running the program over & over to test things > out. > > Anybody seen this? > I don't think that it is down to EuGrid as it does not allocate any font resources internally. I gather that Derek P. thinks that this is a win32lib issue. EuGrid *does* use a lot of other GDI resources so I would be very interested if you get any problems with 'resource leakage'. > > Also, I had a problem the other day with it crashing in the EGW_OnSize > function. It was being called from EGW_OnGridEvent when the > "GridDraw[grid]" sequence had a length of 0. > > I added an if statement to check the length in the OnGridEvent function: > > if msg = WM_SIZE then > -- ignore minimize and maximize for child window > if wParam = SIZE_RESTORED then > -- Create new offscreen bitmap > > -- Added IF statement: > if length(GridDraw[grid])> 0 then > EGW_OnSize( id, grid, lo_word(lParam), hi_word(lParam)) > end if > end if > > > That seemed to take care of it, but I'm not sure that is the most > appropriate solution. ??? > A couple of people mentioned this and hopefully it is fixed in 1.0.1. The problem seems to be that a window can occasionally get a WM_SIZE message before it gets its first WM_DRAWITEM (which triggers the populate of GridDraw). I have implemented a slightly different fix to the one you suggest - seems to work on my PC but let me know if you get any problems... Regards, Phil