Click here to Skip to main content
15,867,308 members
Articles / Desktop Programming / MFC
Article

Playing Cards DLL

Rate me:
Please Sign up or sign in to vote.
1.21/5 (22 votes)
9 Aug 2003 102.2K   1.3K   19   12
A DLL which includes playing cards as bitmpap resources which a developer can use in his/her application

Using cards.dll in an MFC application

 

 

 

 

 

 

 

Introduction

The Cards.dll includes bitmaps of playing cards as resources. It can be useful for developing card games.

Using the code

There was actually no coding involved in producing the DLL, as a matter of fact, it is just a convenient way of storing a large number of bitmaps that could be used in several programs. The code section below is an example of how to load a bitmap from Cards.dll.

//INCLUDE THE CARDS.h FILE FOUND IN THE ZIP CODE TO USE THE DEFINES, 
//OTHERWISE YOU CAN USE THE RESOURCE NUMBERS, AS EXPLAINED IN THE .H 
//FILE

#include "Cards.h"

//LOAD THE DLL

HMODULE <code>hModule</CODE> = LoadLibrary("Path\\To\\Cards.dll"); 

//LOAD THE BITMAP
HBITMAP <CODE>hBitmpap</CODE> = 
        LoadBitmap(<CODE>hModule</CODE>,MAKEINTRESOURCE(IDB_H01))); 
//IDB_H01 IS THE ACE OF HEARTS, WHICH CORRESPONDS TO 4001

//FREE THE DLL
FreeLibrary(<CODE>hModule</CODE>);

//FOR MFC, IT IS RECOMMENDED TO USE 
//AfxLoadLibrary(...) and AfxFreeLibrary (...) <P></P>

History

This is my first update. Suggestions are well accepted!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 1 Pin
David Crow23-Jan-09 10:29
David Crow23-Jan-09 10:29 
GeneralNeed Help with Cards DLL... Pin
captjacksparrow7-May-04 4:11
captjacksparrow7-May-04 4:11 
GeneralAll I can get is some bitmaps Pin
xufeisjtu11-Aug-03 21:43
xufeisjtu11-Aug-03 21:43 
GeneralRe: All I can get is some bitmaps Pin
eugi12-Aug-03 0:23
eugi12-Aug-03 0:23 
GeneralRe: All I can get is some bitmaps Pin
xufeisjtu12-Aug-03 0:48
xufeisjtu12-Aug-03 0:48 
GeneralRe: All I can get is some bitmaps Pin
eugi12-Aug-03 0:49
eugi12-Aug-03 0:49 
GeneralRe: All I can get is some bitmaps Pin
xufeisjtu12-Aug-03 0:56
xufeisjtu12-Aug-03 0:56 
GeneralRe: All I can get is some bitmaps Pin
eugi12-Aug-03 1:00
eugi12-Aug-03 1:00 
GeneralCool, but did you know... Pin
Kippesoep10-Aug-03 0:58
Kippesoep10-Aug-03 0:58 
GeneralRe: Cool, but did you know... Pin
eugi10-Aug-03 1:02
eugi10-Aug-03 1:02 
GeneralRe: Cool, but did you know... Pin
savaNT22-Aug-03 1:45
savaNT22-Aug-03 1:45 
GeneralRe: Cool, but did you know... Pin
eugi22-Aug-03 1:46
eugi22-Aug-03 1:46 
make a search on google with "Using cards.dll"

Wink | ;)

www.eugigames.tk

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.