1. I need help
- Posted by Judith Evans <camping at txcyber.com> Jun 06, 2003
- 386 views
I would like someone to help me with IDE. The Code Editor is getting kernel crashes when Find\Replace is used and also for autocomplete of "procedure" with "end procedure". The crash happens in the onPaint_syntax routine which is written with a lot of direct API calls. I'm a novice as far as API is concernted. If anyone has the time and inclination, please contact me. --judith
2. Re: I need help
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 07, 2003
- 389 views
----- Original Message ----- From: "Judith Evans" <camping at txcyber.com> To: "EUforum" <EUforum at topica.com> Subject: I need help > > > I would like someone to help me with IDE. The Code Editor is getting kernel > crashes when Find\Replace is used and also for autocomplete of "procedure" > with "end procedure". The crash happens in the onPaint_syntax routine which > is written with a lot of direct API calls. I'm a novice as far as API is > concernted. > > If anyone has the time and inclination, please contact me. Judith, I just had a look at this routine and BOY!, is this a minefield. I guess what its trying to do is write the lines of text to a offscreen bitmap, using various fonts and colors, then blasting that to the window. There is one thing I can suspect straight off. Replace the line ... hDC = c_func( synGetDC, {hWnd} ) with hDC = getDC(Syntax) And remove the line ... c_proc( synReleaseDC, {hWnd,hDC} ) I say this because the DC is supplied by Windows already during a Paint event and this can be gotten by using the getDC() routine. It is auomatically released when the paint event returns. If the app gets its own DC, then there maybe some weird conflicts. I'm tempted to rewrite this using plain win32lib code 'cos there is nothing you couldn't do there without resorting to API calls. Unless speed is really improved by doing this...??? -- Derek