5,276,406 members and growing! (16,826 online)
Email Password   helpLost your password?
General Programming » DLLs & Assemblies » General     Intermediate

Playing Cards DLL

By eugi

A DLL which includes playing cards as bitmpap resources which a developer can use in his/her application
VC6, VC7, VC7.1, C++Windows, Win2K, WinXP, Win2003, Visual Studio, MFC, Dev

Posted: 9 Aug 2003
Updated: 9 Aug 2003
Views: 56,673
Announcements
Want a new Job?



Search    
Advanced Search
Sitemap
21 votes for this Article.
Popularity: 2.41 Rating: 1.83 out of 5
14 votes, 66.7%
1
1 vote, 4.8%
2
2 votes, 9.5%
3
0 votes, 0.0%
4
4 votes, 19.0%
5
Note: This is an unedited contribution. If this article is inappropriate, needs attention or copies someone else's work without reference then please Report This Article

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 = LoadLibrary("Path\\To\\Cards.dll"); 

//LOAD THE BITMAP

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


//FREE THE DLL

FreeLibrary(hModule);

//FOR MFC, IT IS RECOMMENDED TO USE 

//AfxLoadLibrary(...) and AfxFreeLibrary (...) 

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



Location: United States United States

Other popular DLLs & Assemblies articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 11 of 11 (Total in Forum: 11) (Refresh)FirstPrevNext
Subject  Author Date 
GeneralNeed Help with Cards DLL...membercaptjacksparrow5:11 7 May '04  
GeneralAll I can get is some bitmapsmemberxufeisjtu22:43 11 Aug '03  
GeneralRe: All I can get is some bitmapsmembereugi1:23 12 Aug '03  
GeneralRe: All I can get is some bitmapsmemberxufeisjtu1:48 12 Aug '03  
GeneralRe: All I can get is some bitmapsmembereugi1:49 12 Aug '03  
GeneralRe: All I can get is some bitmapsmemberxufeisjtu1:56 12 Aug '03  
GeneralRe: All I can get is some bitmapsmembereugi2:00 12 Aug '03  
GeneralCool, but did you know...memberKippesoep1:58 10 Aug '03  
GeneralRe: Cool, but did you know...membereugi2:02 10 Aug '03  
GeneralRe: Cool, but did you know...membersavaNT2:45 22 Aug '03  
GeneralRe: Cool, but did you know...membereugi2:46 22 Aug '03  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 9 Aug 2003
Editor:
Copyright 2003 by eugi
Everything else Copyright © CodeProject, 1999-2008
Web10 | Advertise on the Code Project