Click here to Skip to main content
Licence 
First Posted 9 Aug 2003
Views 76,976
Downloads 828
Bookmarked 19 times

Playing Cards DLL

By eugi | 9 Aug 2003 | Unedited contribution
A DLL which includes playing cards as bitmpap resources which a developer can use in his/her application
15 votes, 68.2%
1
1 vote, 4.5%
2
2 votes, 9.1%
3

4
4 votes, 18.2%
5
1.21/5 - 22 votes
4 removed
μ 1.76, σa 2.78 [?]

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

About the Author

eugi



United States United States

Member


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralMy vote of 1 PinmvpDavidCrow11:29 23 Jan '09  
GeneralNeed Help with Cards DLL... Pinmembercaptjacksparrow5:11 7 May '04  
GeneralAll I can get is some bitmaps Pinmemberxufeisjtu22:43 11 Aug '03  
GeneralRe: All I can get is some bitmaps Pinmembereugi1:23 12 Aug '03  
GeneralRe: All I can get is some bitmaps Pinmemberxufeisjtu1:48 12 Aug '03  
GeneralRe: All I can get is some bitmaps Pinmembereugi1:49 12 Aug '03  
GeneralRe: All I can get is some bitmaps Pinmemberxufeisjtu1:56 12 Aug '03  
GeneralRe: All I can get is some bitmaps Pinmembereugi2:00 12 Aug '03  
GeneralCool, but did you know... PinmemberKippesoep1:58 10 Aug '03  
GeneralRe: Cool, but did you know... Pinmembereugi2:02 10 Aug '03  
GeneralRe: Cool, but did you know... PinmembersavaNT2:45 22 Aug '03  
GeneralRe: Cool, but did you know... Pinmembereugi2:46 22 Aug '03  

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

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

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120209.1 | Last Updated 10 Aug 2003
Article Copyright 2003 by eugi
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid