ReactOS  0.4.13-dev-100-gc8611ae
cardlib.cpp File Reference
#include "cardlib.h"
Include dependency graph for cardlib.cpp:

Go to the source code of this file.

Functions

void LoadCardBitmaps (void)
 
void CardLib_SetZoomSpeed (int speed)
 
void PaintRect (HDC hdc, RECT *rect, COLORREF colour)
 

Variables

double __CARDZOOMSPEED
 
HDC __hdcCardBitmaps
 
HBITMAP __hbmCardBitmaps
 
HDC __hdcPlaceHolder
 
HBITMAP __hbmPlaceHolder
 
HPALETTE __holdplacepal
 
int __cardwidth
 
int __cardheight
 
HPALETTE __hPalette
 

Function Documentation

◆ CardLib_SetZoomSpeed()

void CardLib_SetZoomSpeed ( int  speed)

Definition at line 34 of file cardlib.cpp.

35 {
36  __CARDZOOMSPEED = (double)speed;
37 }
double __CARDZOOMSPEED
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
Definition: string.c:80

◆ LoadCardBitmaps()

void LoadCardBitmaps ( void  )

Definition at line 82 of file cardbitmaps.cpp.

83 {
84  HINSTANCE hCardDll;
85 
86 
87  //If Windows NT/2000/XP
88  if(GetVersion() < 0x80000000)
89  {
90  hCardDll = LoadLibrary(TEXT("cards.dll"));
91 
92  if(hCardDll == 0)
93  {
94  MessageBox(0, TEXT("Error loading cards.dll (32bit)"), TEXT("Shed"), MB_OK | MB_ICONEXCLAMATION);
95  PostQuitMessage(0);
96  return;
97  }
98 
100 
101  FreeLibrary(hCardDll);
102  }
103 #ifndef __REACTOS__
104  //Else, Win9X
105  else
106  {
107  hCardDll = LoadLibrary16("cards.dll");
108 
109  if(hCardDll == 0)
110  {
111  MessageBox(0, "Error loading cards.dll (16bit)", "Shed", MB_OK | MB_ICONEXCLAMATION);
112  PostQuitMessage(0);
113  return;
114  }
115 
117 
118  FreeLibrary16(hCardDll);
119  }
120 #endif
121 }
#define LoadLibrary
Definition: winbase.h:3676
DWORD WINAPI GetVersion(VOID)
Definition: version.c:22
#define MB_ICONEXCLAMATION
Definition: winuser.h:779
#define FreeLibrary(x)
Definition: compat.h:405
void LoadCardBitmapsFromLibrary(HINSTANCE hCardDll, int *pwidth, int *pheight)
Definition: cardbitmaps.cpp:21
#define MessageBox
Definition: winuser.h:5688
int __cardwidth
Definition: cardlib.cpp:25
HINSTANCE WINAPI LoadLibrary16(PSTR)
#define TEXT(s)
Definition: k32.h:26
void WINAPI FreeLibrary16(HINSTANCE)
#define MB_OK
Definition: winuser.h:784
int __cardheight
Definition: cardlib.cpp:26
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)

◆ PaintRect()

void PaintRect ( HDC  hdc,
RECT rect,
COLORREF  colour 
)

Definition at line 116 of file cardlib.cpp.

117 {
118  COLORREF oldcr = SetBkColor(hdc, colour);
119  ExtTextOut(hdc, 0, 0, ETO_OPAQUE, rect, TEXT(""), 0, 0);
120  SetBkColor(hdc, oldcr);
121 }
& rect
Definition: startmenu.cpp:1413
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
Definition: dc.c:975
#define ETO_OPAQUE
Definition: wingdi.h:646
DWORD COLORREF
Definition: windef.h:285
#define ExtTextOut
Definition: wingdi.h:4432
HDC hdc
Definition: main.c:9
#define TEXT(s)
Definition: k32.h:26

Referenced by CreateSinkBmp(), CardButton::DrawRect(), CardRegion::PrepareDragBitmaps(), and CardRegion::PrepareDragBitmapsThreed().

Variable Documentation

◆ __cardheight

◆ __cardwidth

◆ __CARDZOOMSPEED

double __CARDZOOMSPEED

Definition at line 18 of file cardrgnmouse.cpp.

Referenced by CardLib_SetZoomSpeed(), and CardRegion::ZoomCard().

◆ __hbmCardBitmaps

HBITMAP __hbmCardBitmaps

Definition at line 19 of file cardlib.cpp.

Referenced by FreeCardBitmaps(), and LoadCardBitmapsFromLibrary().

◆ __hbmPlaceHolder

HBITMAP __hbmPlaceHolder

◆ __hdcCardBitmaps

◆ __hdcPlaceHolder

◆ __holdplacepal

HPALETTE __holdplacepal

◆ __hPalette