Advertisement

Results for "Author: selftaught"

7_2009-2012 #233839
GDI Management put to good use

Ever written a usercontrol that exposed a Font property? Then this code is for you. cFont.cls uses offers many features you won't get with the StdFont object. You can call the Browse method to show the Font dialog and the font properties will be set automatically if the user chooses a font. You can set the font to the ambient font or a system font and it will update itself provided that you call OnAmbientFontChanged from your usercontrol's AmbientChanged event or OnSettingChange in your WM_SETTINGCHANGED handler. All of the properties from the LOGFONT structure are exposed, including charset, escapement, etc. And I even included a property page that allows for multiple properties on multiple controls to be edited simeltaneously, all your controls have to do is implement the iSupportFontPropPage interface. Sound good? I had hoped so! Bug reports are much appreciated. Also, anyone who has downloaded my last submission, GDI management, should check out the new version I just uploaded with additional optimizations and much more in depth explanations and comments.

7_2009-2012 #233840
GDI Management (Updated 1/19/05)

That horrible bug found by Lavolpe scared me into spending half the night going over this code with a fine-tooth comb. Minor optimizations and major commenting added. Anyone who downloaded the code before this update will probably want to scrap the old version and grab this one. Also check out the new screenshot. If that's not stress testing, I don't know what is! Inspired by Lavolpe's "GDI Font Management" submission, this code is a drop-in replacement for common gdi api calls. The benefits of using this code as opposed to the api calls directly are two-fold: 1. Identical fonts, brushes and pens are shared between all procedures who request them. A reference count is kept, and the objects are deleted when no longer in use. 2. Debugging is simple, simply change a few compiler constants and you will receive a debug message if any font, brush, pen, DC, or bitmap handles are leaked. This code is very fast, because it hashes the gdi objects and uses a linked list to store the necessary information. Actually it's a bit more complicated than that because the nodes in the list must be looked up by the gdi object when creating an object and by the handle when destroying it. So two linked lists are kept, but only one set of nodes. One is used to lookup by the gdi object and the other by handle.

7_2009-2012 #233841
Advanced Subclasser

This code uses Paul Caton's subclassing assembly code, but extends it to allow any number of objects to subclass the same hwnd. It is fast and memory effecient, and is easy to use. Included is a bare-bones example and an more thorough testing tool.

7_2009-2012 #233842
vbBase Dll

vbBase. So named because it is the foundation of all my best projects. It encapsulates all the details involved in subclasses, windows hooks, api timers, registered classes, vtable subclassing such as the iEnumVARIANT interface for for .. each enumeration and iOleInPlaceActiveObject, iPerPropertyBrowsing, and iOleControl for building powerful usercontrols.

7_2009-2012 #233843
vbComCtl - revisited

Your GUI dream come true. 20 usercontrols to replace MS common controls 1, 2, and 3, the richedit and masked edit libraries, plus nice looking popup menus and a CC 6.0 friendly replacement for VB.Frame. Lots of goodies here. UPDATE: major refactoring done. vbBase.dll is history. now there is only the ocx and the test project. All api declares have been moved to a tlb, which allows for simply toggling overriding those declares using a compiler switch. This means that every singe allocated resource is tracked to ensure zero leakage. (See screen shot) Serious optimizations for size and speed. Eight bottleneck functions written in pure assembly. This is a veritable mountain of useful code, whether you want to take the time to figure out how it works for yourself or just remove the parts you need for your app. Recommended highlights: pcIntegerMap & pcStringMap for hash tables, mSubclass for asm subclassing (not Paul's, even better!), and mDebug for some techniques you could use to track all allocated resources in other projects.

Languages
Top Categories
Global Discovery