Function cdtDraw

Function cdtDraw(hDC As Long, x As Long, y As Long, _
ecsCard As ECardSuit, ectDraw As ECardType, _
clr As Long) As Long

This procedure draws a card in its normal size at position x, y on the device context hDC. The ectDraw parameter controls whether the front, the back, or the inverted front of the card is drawn. The ecsCard parameter controls which card is drawn. If the faces are shown, use the values 0 through 51 to represent each card. You can use the constants ecsClubs, ecsDiamonds, ecsHearts, and ecsSpades to represent the first card in each suit, adding multiples of 4 (or the ECardFace constants) to represent cards from ace to king. For example, ecsDia­monds + ecfThree is the three of diamonds, ecsHearts + ecfAce is the ace of hearts, and ecsSpades + ecfKing is the king of spades.


If the backs are drawn, use the following constants for the different backs: ecbCrossHatch, ecbPlaid, ecbWeave, ecbRobot, ecbRoses, ecbIvyBlack, ecbIvy­Blue, ecbFishCyan, ecbFishBlue, ecbShell, ecbCastle, ecbBeach, ecbCardHand, ecbX, and ecbO. The clr parameter sets the background color for the ecbCross­Hatch card back, which uses a pattern drawn with lines. All the other backs and fronts are bitmaps, so the color has no effect.