C a r d s . d l l     E N H A N C E D

An enhanced alternative for Microsoft Windows playing card drawing library - Cards.dll

Version 2005.01

Introduction » «

Cards.dll Enhanced is an alternative for Windows 2000 and XP Cards.dll. Windows Cards.dll is located in Windows\System32 folder and is used by several Windows games like Solitaire (sol.exe). Card.dll is also used by FreeCellPro 6.4.

Main improvements are better card drawing and user-defined decks with larger images. Requires desktop resolution greater than 1024x768 for maximum benefit.

This enhanced Cards.dll makes use of MFC42.dll and some CommonControl and OLE dlls that are included in Windows 2000 & XP. This Cards.dll runs from a separate folder and does not physically replace any Windows OS files.

The legacy cdtAnimate function is not implemented in this Cards.dll. cdtAnimate implements card-back animation which was last used on Windows 2000 Solitaire.

Microsoft freecell.exe and mshearts.exe also work like sol.exe, except their windows do not resize like Solitaire.

Physically replacing the Cards.dll in Windows\System32 folder (WINNT\System32 on some installations) is not recommended.

Usage and Configuration » «

For best results, card images should display at full resolution. Therefore, use the card size displayed with the card deck selection to set the card size in Free Cell Pro. For Microsoft Solitaire, the card will automatically display at greatest possible resolution.

When the enhanced Cards.dll is running, an icon appears in the the desktop tray near the Windows clock. Clicking on this icon displays a Cards.dll Settings window.

Depending on the application, some changes to the Cards.dll settings materialize when Cards.dll restarts. Therefore, make changes, then exit the running application and start it again.

• Deck Selection » «

By default the dll uses internal resource images that are derived from the Microsoft card images. If an external deck is selected, these internal images are not used.

Select a deck by clicking on the decks folder in the drop-down combo box in the settings dialog. For example: selecting 'Standard 213x288 Gifs' will load images from that folder. The Dll loads folder names and the previously selected deck at startup.

When a deck loads successfully, the preferred card dimension setting is displayed on the status line below the decks path in the Settings dialog. Use this to match the Card Size in Free Cell Pro.

If the card image folders are not located with the Cards.dll, change the Cards Folder setting by hitting the 'Change Decks Path' button.

Hitting this button starts a 'Card Folders Path Change ...' window. The current setting of the Card Folders Path is displayed. Change it to the desired location and hit 'OK'. Card Folders in the new location are immediately loaded into the drop-down combo box.

• Corner Types » «

The Corner Type setting can be Sharp, Medium, or Rounded. Sharp corners add a 1 pixel border around the card image. Medium corners are 2 pixels while the Rounded corners add a 3 pixel border around the image.

The card image's first pixel (0, 0) is read to determine the color to use in the area between the border lines and the card image.

Sharp corners are forced in Solitaire since the Rounded corners do not work correctly.

• Border Color » «

The Border Color may be changed as per user preference. Note that the border is always a single pixel wide line around the card.

Use lighter border color with darker card-back.

• Settings Save » «

By default the dll saves Settings in a Cards.ini file in the same folder as the dll. If the Cards.dll is copied to another folder or machine, copying the Cards.ini file will copy the dll setting to the new location. Similarly, using multiple Cards.dll on a single machine allows different settings for each Cards.dll folder.

Setting the option to save setting into the Windows Registry will save settings into \HKEY_CURRENT_USER\Software\Ammaxamma\Cards in the Registry. Using this method will make the same settings available to all copies of the Cards.dll.

However, note that uninstallation of these Registry entries requires the user to edit the windows registry manually.

Deck Design » «

Each folder in the Card.dll install folder contains card deck image sets. New deck images are installed by simply adding a folder to Cards.dll install folder.

Deck design means creating card images into a new folder. New card image dimensions should follow these directives:

Recommended card image size for display resolution to 1600x1200 is between 1 to 2.5 times (71x96). Examples: 1.5 - (106x144), 2 - (142x192), 2.5 - (177x240)

Examine images in deck folder to understand the naming convention. Card images 1.jpg thru 52.jpg are the actual card images of AceClub, TwoClub, ... KingSpade.

Image 53.jpg is the Ghost Card. 54.jpg thru 65.jpg are card backs. 67.jpg and 68.jpg are O and X cards used in Solitaire. Other images (3-digit names) are for card back animation and never used or loaded. This dll does not implement the cdtAnimate() API. They are included only for completeness.

Installation and Uninstallation » «

Running the setup file SetupCards.exe will install the Cards.dll and associated files into a location of your choice. The install wizard shall also create desktop icons for Free Cell Pro and Solitaire.

To uninstall either select Uninstall from the Program Group in the Start menu, or use Add/Remove Programs applet in the Control Panel. Any Windows Registry entries remain.

When using Card.zip just unzip the distribution ZIP file into a convenient location. The ZIP file contains the Cards.dll file, some deck image folders, Free Cell Pro program, and Microsoft Solitaire, Freecell and Hearts.

Run the programs from the unzip location, and the applications will automatically pick up the enhanced Cards.dll from this folder instead of the Microsoft Cards.dll under Windows\System32. Create desktop short cuts of programs for convenience.

To uninstall, just delete the program's folder, zip file, and desktop short cuts. Edit Windows Registry if needed.

Troubleshooting » «
Reference Links » «

• Cards Dll Tutorials

• Free Cell Pro Reference

• Code Project

• Free Card Images

• MSDN: Images in MFC

License » «

This software is freeware. All the legal-type disclaimers against misuse and suitability responsiblity apply.

The contents of this file must remain intact in any redistribution.