Marquee de Sells: Chris's insight outlet for category 'tools' via ATOM 1.0 csells on twitter

You've reached the internet home of Chris Sells, who has a long history as a contributing member of the Windows developer community. He enjoys long walks on the beach and various computer technologies.




Welcome to Genghis!

Welcome to Genghis

Genghis is a set of extensions built on top of .NET and integrated with WinForms to provide application-level services in the same flavor as the Microsoft Foundation Classes. Genghis gets its name as the functional heir to Attila, a similar set of functionality built on top of ATL.

Disclaimer

Most of the Genghis classes were built by different folks and while every effort was made to keep things consistent by choosing .NET and WinForms design techniques, everyone does things their own way.

This work is the work of the individuals involved and does not represent any contribution of their respective employers. You are under no obligation to use any of Genghis at any time, but if you do, you are required to abide by the License.

Installation

You can download the latest Genghis source code from here. The Genghis archive includes this page, the source code to the Genghis class library, a series of samples showing off the various classes and a pre-built, signed version of genghis.dll in the redist folder. Notice that some of the samples use the Genghis files directly instead of using the compiled Genghis assembly. Either usage is supported by Genghis (except where it drives the WinForms Designer nuts).

Source Code Control

Genghis source code control has been moved to the Genghis CodePlex workspace. Thanks to GotDotNet and Rob MacFadyen for hosting the previous versions.

Building Genghis

Genghis is written in C#. Building Genghis requires Visual C# or Visual Studio.NET. Visual Studio.NET solution and project files (*.sln and *.csproj) are provided to build Genghis and all the samples. You should be able to load any solution file into Visual C#/Visual Studio.NET and build the project for yourself.

A NAnt build script (Genghis.build) is also provided. It is used to make the snapshot for Genghis, and is not designed for general use. You may wish to use this file to simulate the snapshot build process; please be aware that you will not be able to properly sign the release mode Genghis DLL (the private key is not provided in this distribution).

For Visual Studio.NET related build issues, please contact the Off Topic Windows mailing list. This is where the Genghis contributors have their discussions, and most of them will be familiar with Visual Studio.NET builds of Genghis. If you have NAnt related build issues, you should contact Mike Marshall (the Genghis build master) directly.

Thanks to Brad Wilson for the NAnt build scripts for folks without VS.NET.

Bug Reports

Bugs will now be kept in the Bug Tracker section of the GDN Workspace.

Please do not send Chris Sells or any of the other contributors personal email complaining about Genghis. Also please do not post Genghis bug reports to any mailing list. A much better way to contribute to the life of Genghis is to submit the fix along with the bug report.

Submission Guidelines

The Genghis Group

This group is made up of official Genghis contributors:

Who Does What

If you'd got something you'd like to see contribute to Genghis, please let me know (multiple people are free to collaborate on a single feature).

Feature

Owner(s)

Progress

Screen Shot(s)

Command line parser

Chris Sells

included

screenshot

Completion combo

Chris Sells

included

screenshot

Control hosting status bar

Ethan Smith

included

screenshot

Cursor changer

Shawn Wildermuth

included

screenshot

Custom check state treeview

Chris Sells

included

screenshot

Custom XP theming controls

Matthew W. Adams et. al.

included

screenshot

File Search Engine

Mike Marshall

included

screenshot

FileDocument class (doc/dirty bit management)

Chris Sells

included

screenshot

FindReplaceDialog

Ramakrishna Vavilala

included

screenshot

FolderNameDialog

Chris Sells

included

screenshot

HandleCollector for the world

Ethan Brown

included

screenshot

Header group box control

Matthew Adams

included

screenshot

Image combo

Horst Veith

included

screenshot

More robust validation ala WebForms

Michael Weinhardt

included

screenshot

Most-Recently-Used (MRU) files support

Michael Weinhardt

included

screenshot

MSN Messenger-style popup window

Mike Marshall

included

screenshot

Multiple Top-Level Windows

Chris Sells

included

screenshot

Multiple-instance detection

Chris Sells

included

Path resolution b/w UNC, local (including SUBST, etc)

Ethan Brown

included

screenshot

Retrieving mapped drives

Ethan Brown

included

screenshot

Retrieving shares

Ethan Brown

included

screenshot

Screen Saver class

Shawn Van Ness

included

screenshot (sorta : )

Scrollable Picture Box

Husein Choroomi

included

screenshot

Sorting listview (including the little triangle thingy)

Horst Veith

included

screenshot

Splash Screen class

Peter Foreman

included

screenshot

Status Bar Extender

Chris Sells

included

screenshot

WebCommandLineHelper

Chris Sells

included

screenshot

Window serializer

Paul Bartrum

included

screenshot

Wizard framework

Shawn Wildermuth

included

screenshot

HtmlLinkLabel class Jeff Key included screenshot
User-resizable panel Ethan Brown included screenshot

Gradient Progress Bar

Mike Marshall

included

screenshot

Command updating

Paul Bartrum

sample

screenshot

Cool bars/Cool menus

Chris Burrows

sample

screenshot

Docking App Bar

Dean Cleaver

sample

screenshot

A real image list control

Matt Wilson (of Attila fame!)

pending

Advanced layout managers, e.g. grid/table

Matthew Adams

pending

Command routing

Paul Bartrum

pending

Dynamically docking/undocking windows

TBD

pending

href exe-safe serialization framework

Chris Sells

pending

Managed HTML display ala a C# port of Mozilla?

TBD

pending

Menu/toolbar editing ala Office or VS.NET

Paul Bartrum, Chris Burrows

pending

Outlook-style Bar

Richard Birkby

pending

SDI, MDI and Explorer-style application wizard

TBD

pending

Tab-based MDI implementation (ala VS.NET)

TBD

pending

Tear-off menus

Matt Wilson

pending

Note: Anything marked with "sample" means that there's a sample included with Genghis that shows the current implementation of a feature but that it's not done enough to be part of the official Genghis component. Mostly the hold-up is integration with the WinForms Designer.

Documentation

The Genghis documentation is composed of the C# documentation comments as part of the automated build. Check redist\Genghis.chm for the latest.

SimplePad

SimplePad is an MFC application that should serve as a simple baseline for what Genghis should enable to be built easily. We currently need a raw WinForms implementation to help guide the Genghis development efforts. After building it, use Help->Help Topics to see the list of features that the MFC SimplePad application provides straight out of the wizard (also duplicated here):

The current .NET implementation of SimplePad is now available as one of the Genghis samples. Thanks to Paul Bartrum and Chris Burrows for all their hard work on this!

History

Sponsors

rmTrack provided the initial hosting space and administration support for Genghis bug tracking and source code control.

License

Copyright © 2002-2004 The Genghis Group

Th is software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required, as shown here:

    Portions copyright © 2002-2004 The Genghis Group (http://www.genghisgroup.com/).
     
  2. No substantial portion of the source code of this library may be redistributed without the express written permission of the copyright holders, where "substantial" is defined as enough code to be recognizably from this library.

License Note

This license based on the open source zlib/libpng license. The idea was to keep the license as simple as possible to encourage use of Genghis in free and commercial applications and libraries, but to keep the source code together and to give credit to the Genghis contributors for their efforts. While this license allows shipping Genghis in binary form, if shipping a Genghis variant is the sole purpose of your product, please contact The Genghis Group for a new license.

0 comments




VS.NET Fun Facts

If you haven't seen it yet, check out the VS.NET Fun Facts piece that started as praise and bitching about VS.NET, but turned into something pretty useful if you'd like to get the most out of VS.NET.

0 comments




CorPub

Oct 10, 2001

I've updated CorPub to show *all* managed AppDomains by initializing the COR debugging sub-system prior to enumerating them. Thanks to Atif Aziz for the tip.

September 13, 2001

I built the CorPub utility when my friend Jason pointed me at the .NET corpub.idl interfaces (his exact words were "ICorPublishProcess rocks!"). CorPub lists the managed processes on the current machine and the AppDomains in each process, as follows:

Managed process 0xa54: D:\project\mine\RegexPlorer\bin\Debug\RegexPlorer.exe
	AppDomain 0x1: RegexPlorer.exe

Managed process 0xdc8: C:\vs.net\Common7\IDE\devenv.exe
	AppDomain 0x1: DefaultDomain

Managed process 0x1ec: C:\PROGRA~1\MICROS~2.NET\FRAMEW~1\Bin\ildasm.exe
	AppDomain 0x1: DefaultDomain

It's fun for spelunking. Enjoy.

NOTE: .NET beta 2 is required to run this utility.

0 comments




.NET XML Checker and Validator

Aug 8, 2001

xmlValid is simple command line utility that will check an xml file for well-formedness and, optionally, will validate it against a supplied XML schema file (xsd). I built it to check that my site's HTML files were well-formed (and therefore XHTML-compliance), but it's got all kinds of other uses, including checking .NET .config files. Source is included. Enjoy.

Usage: xmlValid.exe xmlFile [xsdFile]

Note that this utility requires .NET beta 2 to be installed.

0 comments




Setting the Completion Character

Aug 7, 2001

Whenever I set up a new machine (which happens a lot as WinXP and .NET go through their beta & RC cycles), I always need to manually set up the completion character (to TAB, of course) in the Registry. Shawn VanNess posted a .rgs file that would set this up without the lengthy search through the Registry. Inspired by Shawn, here's my own completionChar.reg that doesn't require a program to parse .rgs files (which doesn't come with Windows).

BTW, if you don't know about the command shell's Completion Character, stop right now, run the completionChar.reg file, start up a WinNT/Win2K/WinXP command shell, type "cd c:\p[TAB]" and watch while the shell expands it to "cd C:\Program Files\" for you. If you have other directories that start with "c:\p", continue to hit [TAB] to cycle through them. This works for any directory or file name and it boosts my productivity by about 100% on the command line. I can't live without it!

0 comments




NullScript Used to Reverse Engineer Gen<X>

Wow. I'm impressed as all get out. Hugh Brown has reverse-engineered Gen<X> as one of the tests of his NullScript implementation. I wish I would have had this when I started Gen<X> a couple of years ago. It would've saved me figuring out how ASP did it.

My thinking along these lines years ago led me to go the opposite way, i.e. I built a front-end ASP parser that generated script for VBS. I called it TextBox (which, as a Win32 programmer, I should've realized was a terrible name...).

0 comments




Moniker Wizard

Here's my moniker wizard that includes the framework used by the Basic Monikers.

0 comments




Tim's COM+ Utilities

Aug 4, 2001

The great and powerful Tim Ewald (author of Transactional COM+: Building Scalable Applications and personal friend of mine) put together a handy little set of COM+ classes and utility functions in a concise header file that he has graciously allowed me to host. Among my favorites are IsInActivity, IsInTransaction, IsSecurityEnabled, GetCallersName,  IsCallerInRole, and parameterized versions of CoGetObjectContext and GetAspObject (which is even cooler than my CAspPtr). Download the code! Buy the book! Feed your brain!

0 comments




Command Line Parsing

Aug 3, 2001

I got tired of not having getopt under Win32 and the best version to port doesn't handle slashes (as per the Windows standard) or @files for arguments and it requires you to give away the source for every app that uses it, so, inspired by my friend Josh Gray,  I built my own. It supports typed flags and params, @file support and building full usages on the fly.

Plus, the latest version has support for parsing ANSI or Unicode argfiles, as provided by Johan Nilsson. Thanks, Johan! Also, I've added a contribution by Paul Westcott to support arguments with restricted values. Thanks, Paul! And, as if that weren't enough, Adis Delalic contributed a UML diagram to describe how the CLP is built. Wow.

And as if that weren't enough, Keith Brown ported the command line parser to VS.NET. Thanks, Keith!

0 comments




Expando Objects

Aug 2, 2001

I've seen lots of interest lately in expando objects, e.g. objects that can add methods and properties on the fly. Joe Graf wrote a piece on IDispatchEx in MIND that was pretty interesting. My own implementation of IDispatchEx is available here. It supports expando objects that have no static properties or methods as well as those that do. Check out the DispExTest.js for a demonstration, dispeximpl.h, dynamemlist.h and dynamemlist.cpp for the implementation and MyExpando.h for the usage.

0 comments




Windows Template Library

Aug 1, 2001

0 comments




VARIANT_BOOL Wrapper

July 31, 2001

CComBool is a class to prevent the misuse of the VARIANT_BOOL type. VARIANT_BOOL is a problem because its legal values are -1 and 0 instead of 1 and 0, making converting back and forth between bool, BOOL and VARIANT_BOOL problematic. CComBool supports the constructors and operators needed to convert between the three C++ Windows Boolean types. It also supports operator& and CopyTo for common COM client and server usage. CComBool is available here.

0 comments




ATL CRT Numbers

July 30, 2001

The following table lists the various prices you pay for using the CRT and the default Win98 support in VC6. The builds were done with VC6, SP3, ATL COM in-proc server, no classes, no MFC, no merged p/s:

Target CRT Win98 Size
RelMinSize _ATL_MIN_CRT yes 24KB
RelMinDepend _ATL_MIN_CRT yes 24KB
RelMinSize _ATL_MIN_CRT /opt:nowin98* 7KB
RelMinDepend _ATL_MIN_CRT /opt:nowin98 10KB
RelMinSize MSVCRT /opt:nowin98 20KB
RelMinDepend MSVCRT /opt:nowin98 22KB

*Note: /opt:nowin98 is a VC6 linker switch that says not to align binaries on a Win98-friendly boundary. /opt:nowin98 builds will still load and run under Win98 without a problem, but the loading time could be longer. Also, when images get above 24KB, the /opt:nowin98 seems not to much of an affect on the size of the image.

0 comments




VBLite

July 29, 2001

Dharma Shukla and I wrote "Extending ATL3.0 Containment to Help You Write Real-World Containers" in the 12/99 issue of MSJ detailing how to add much-needed features to ATL's support for control containment. Dharma wrote the sample code that accompanies the piece and has already made improvements to the code based on feedback. He's maintaining the history and bits here.

0 comments




Attila

Attila stands for "ATL for Applications." Attila is a set of extensions built on top of ATL to provide application-level services in the same flavor as MFC. Towards that end, Attila uses a lot of the same notions as ATL, e.g. heavy use of templates, static binding and reliance on the compiler and the linker doing their job.  Also, in the flavor of ATL, Attila is under-documented and requires a lot of user investment to make use of it. However, once you do, we think you'll find the flexibility and efficiency worth it. If you don't, you haven't lost much, 'cuz Attila is free. Enjoy.

0 comments




25 older posts       195 newer posts