ToolBar Performance Hit
-
I have a MDI application with a customized toolbar. This toolbar has up to 4 edit boxes (command profile configurable) that get updated and provide feedback of geo-coordinates(MTM, UTM, Lat/Long,etc). I have noticed that my toolbar works fine until I add another toolbar to the app. The other toolbars are not dynamic in nature like the coordinate toolbar, so it really shouldn't hit the performance of the coordinate toolbar's editbox updates, but it does. The update of the coordinate toolbar's editboxes are driven by mouse movements(OnMouseMove). Any ideas? Thanks!
-
I have a MDI application with a customized toolbar. This toolbar has up to 4 edit boxes (command profile configurable) that get updated and provide feedback of geo-coordinates(MTM, UTM, Lat/Long,etc). I have noticed that my toolbar works fine until I add another toolbar to the app. The other toolbars are not dynamic in nature like the coordinate toolbar, so it really shouldn't hit the performance of the coordinate toolbar's editbox updates, but it does. The update of the coordinate toolbar's editboxes are driven by mouse movements(OnMouseMove). Any ideas? Thanks!
OnUpdate handlers are called for each toolbar button during idle processing etc. You need to keep the amount of time each handler spends doing whatever it does to a minimum. If your the calc's for your edit boxes take too long you will see sluggish performance. Mousemoves can be sent with the same coordinates as the previous call. You should check if they've changed and if not do zip. Also look at profiling your code. I personally like Glowcode www.glowcode.com[^] Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com