Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CARDS.DLL routine list wanted!

2 views
Skip to first unread message

R. Kevin McLeod

unread,
Dec 11, 1995, 3:00:00 AM12/11/95
to
ro...@u.washington.edu (Roya Naini) wrote:

>Does anyone know where I can get a list of the routines that are
>contained in the CARDS.DLL file so that I can write my own Card Games?
>I've checked the MS Web Page, MS SDK for Windows, Visual Basic Manual,
>Visual Basic in 21 Days. I've had no luck with any of these resources.
>If you know of anywhere I can get a list of routines to display and
>manipulate cards and such please email me at ro...@carson.u.washington.edu

Try _Hardcore_Visual_Basic_, by Bruce McKinney. Microsoft Press.
It's a fantastic book that REALLY gets down into the gears that link
VB and the Windows API. He includes a sample that shows EXACTLY how
this .DLL works.

In fact, did you know that the Windows 95 CARDS.DLL is the same one
(16-bit) that Windows 3.1 used? [That's what I seem to remember
reading] There's a different one (32-bits) if you're running Windows
NT, but it's not compatible with the card games in Win95. McKinney
offers you a 32-bit CARDS32.DLL if you want to develop new
fully-32-bit card games for Windows 95.


Greg Dainard

unread,
Dec 13, 1995, 3:00:00 AM12/13/95
to
In article <4agqbq$g...@nntp5.u.washington.edu>, ro...@u.washington.edu says...

>
>Does anyone know where I can get a list of the routines that are
>contained in the CARDS.DLL file so that I can write my own Card Games?
>I've checked the MS Web Page, MS SDK for Windows, Visual Basic Manual,
>Visual Basic in 21 Days. I've had no luck with any of these resources.
>If you know of anywhere I can get a list of routines to display and
>manipulate cards and such please email me at ro...@carson.u.washington.edu
>
-------------------
The following was recently posted in the VISBAS-L mailing list:
-------------------
> Does anyone know where I can find documentation for calls to CARDS.DLL? I
have
> Appelman's API book, but it doesn't even mention them.

Here's what someone else posted awhile back:
============================================================================
===
Option Explicit
'Delarations and utilities for using CARDS.DLL

'Actions for CdtDraw/Ext Global Const C_FACES = 0 Global Const C_BACKS = 1
Global Const C_INVERT = 2

'Card Backs
Global Const CROSSHATCH = 53
'etc
'Global Const UNUSED = 66
Global Const THE_X = 67
Global Const THE_O = 68

'Initialisation
'CdtInit must be called before anything else. It returns
'the default width and height for the cards, expressed in
'pixels.
Declare Function CdtInit Lib "CARDS.DLL" (nWidth As Integer, nHeight As
Integer) As Integer

'Draw a card using the default size
'CdtDraw can be used to draw a card with the default size
'at a specified location in a form, picture box or whatever.
'It can draw any of the 52 faces an 13 different Back designs,
'as well as pile markers such as the X and O. Cards can also
'be drawn in the negative image, eg to show selection.
'xOrg = x origin in pixels
'yOrg = y origin in pixels
'nCard = one of the Card Back constants or a card number 0 to 51
'nDraw = one of the Action constants
'nColour = The highlight colour
Declare Function CdtDraw Lib "CARDS.DLL" (ByVal hDC As Integer, ByVal
xOrg As Integer, ByVal yOrg As Integer, ByVal nCard As Integer, ByVal
nDraw As Integer, ByVal Colour&) As Integer

'Draw a card, any size.
'Much the same as CdtDraw, but you can specify the height & width
'of the card, as well as location.
'nWidth = Width of card in pixels
'nHeight = Height of card in pixels.
Declare Function CdtDrawExt Lib "CARDS.DLL" (ByVal hDC As Integer, ByVal
xOrg As Integer, ByVal yOrg As Integer, ByVal nWidth As Integer, ByVal
nHeight As Integer, ByVal nCard As Integer, ByVal nDraw As Integer, ByVal
Colour&) As Integer


'Termination - Releases memory
'CdtTerm should be called when the program terminates. Primarily
'it releases memory back to Windows.
Declare Function CdtTerm Lib "CARDS.DLL" () As Integer


'An example to draw a card
'Dim intResult As Integer
'Dim hDCPic As Integer
'Dim intHeight As Integer
'Dim intWidth As Integer

'Initialise
' intHeight = 0
' intWidth = 0
' intResult = CdtInit(intWidth, intHeight)

'Size the picture box to that of the card
' picCard.ScaleWidth = intWidth
' picCard.ScaleHeight = intHeight
'Display a few cards of default size on the picture box
' hDCPic = picCard.hDC
' intResult = CdtDraw(hDCPic, 0, 0, CROSSHATCH, C_FACES, &H808080)
'picCard.Refresh
'Terminate
' intResult = CdtTerm()
============================================================================
===
HTH...

--
_/| _/| _/ "Perception is everything, \_ |\_ |\_
_/ |_/ |_/ reality is incidental" \_| \_| \_
_/ _/ Malcolm Michael (m...@triad.com) \_ \_


--
Greg Dainard e-mail: ge...@phoenix.net
Systems Analyst WWW: http://www.phoenix.net/~getj


0 new messages