Click here to Skip to main content
6,306,412 members and growing! (17,311 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.1Win2K, WinXP, Win2003, Visual Studio, MFC, Dev
Posted:9 Aug 2003
Views:64,561
Bookmarked:14 times
Unedited contribution
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
22 votes for this article.
Popularity: 2.36 Rating: 1.76 out of 5
15 votes, 68.2%
1
1 vote, 4.5%
2
2 votes, 9.1%
3

4
4 votes, 18.2%
5

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


Member

Location: United States United States

Other popular DLLs & Assemblies articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 12 of 12 (Total in Forum: 12) (Refresh)FirstPrevNext
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    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-2009
Web16 | Advertise on the Code Project