ReactOS 0.4.15-dev-8127-g6338913
cardwindow.cpp
Go to the documentation of this file.
1//
2// CardLib - CardWindow class
3//
4// Freeware
5// Copyright J Brown 2001
6//
7
8#include "cardlib.h"
9
10#include <tchar.h>
11
12extern HPALETTE __holdplacepal;
13
14HPALETTE UseNicePalette(HDC hdc, HPALETTE hPalette)
15{
16 HPALETTE hOld;
17
18 hOld = SelectPalette(hdc, hPalette, FALSE);
20
21 return hOld;
22}
23
24void RestorePalette(HDC hdc, HPALETTE hOldPal)
25{
26 SelectPalette(hdc, hOldPal, TRUE);
27}
28
29HPALETTE MakePaletteFromCols(COLORREF cols[], int nNumColours);
30void PaintRect(HDC hdc, RECT *rect, COLORREF colour);
31HBITMAP CreateSinkBmp(HDC hdcCompat, HDC hdc, COLORREF col, int width, int height);
32void GetSinkCols(COLORREF crBase, COLORREF *fg, COLORREF *bg, COLORREF *sh1, COLORREF *sh2);
33
34void LoadCardBitmaps();
35void FreeCardBitmaps();
36
37static TCHAR szCardName[] = _T("CardWnd32");
38static bool fRegistered = false;
40
41
43{
44 WNDCLASSEX wc;
45
46 //Window class for the main application parent window
47 wc.cbSize = sizeof(wc);
50 wc.cbClsExtra = 0;
51 wc.cbWndExtra = sizeof(CardWindow *);
53 wc.hIcon = 0;
55 wc.hbrBackground = 0;
56 wc.lpszMenuName = 0;
58 wc.hIconSm = 0;
59
60 RegisterClassEx(&wc);
61}
62
64{
65 HDC hdc = GetDC(0);
66
67 nNumButtons = 0;
69 nNumDropZones = 0;
70 nBackCardIdx = 53;
71
73 hbmBackImage = 0;
74 hdcBackImage = 0;
75
76 srand((unsigned)GetTickCount());
77
78 //All colours (buttons, highlights, decks)
79 //are calculated off this single base colour
80 crBackgnd = PALETTERGB(0,80,0);//PALETTERGB(0,64,100);
81
82 // If uCardBitmapRef was previously zero, then
83 // load the card bitmaps
85 {
87
89
91
93
95
96 }
97
98 ReleaseDC(0, hdc);
99
100 //register the window class if necessary
101 if(!fRegistered)
102 {
103 fRegistered = true;
105 }
106
107}
108
109BOOL CardWindow::Create(HWND hwndParent, DWORD dwExStyle, DWORD dwStyle, int x, int y, int width, int height)
110{
111 if(m_hWnd)
112 return FALSE;
113
114 //Create the window associated with this object
115 m_hWnd = CreateWindowEx(dwExStyle, szCardName, NULL,
116 dwStyle,
117 x, y, width, height,
119
120 return TRUE;
121}
122
124{
126 m_hWnd = 0;
127
128 return TRUE;
129}
130
132{
133 if(m_hWnd)
135
136 DeleteAll();
137
139 {
141
144
146
147 if(__hPalette)
149 }
150}
151
153{
154 int i;
155
156 for(i = 0; i < nNumCardRegions; i++)
157 {
158 delete Regions[i];
159 }
160
161 for(i = 0; i < nNumButtons; i++)
162 {
163 delete Buttons[i];
164 }
165
166 for(i = 0; i < nNumDropZones; i++)
167 {
168 delete dropzone[i];
169 }
170
172
173 return true;
174}
175
177{
178 crBackgnd = cr;
179 int i;
180
181 //
182 // Create the exact palette we need to render the buttons/stacks
183 //
185
186 if(__hPalette)
188
190
191 //
192 // re-create the place-holder!
193 HDC hdc = GetDC(m_hWnd);
194
196
198
200 //SelectObject(__hdcPlaceHolder, __hbmPlaceHolder);
201
202 //reset all buttons to same colour
203 for(i = 0; i < nNumButtons; i++)
204 {
205 if(Buttons[i]->GetStyle() & CB_PUSHBUTTON)
206 {
207 Buttons[i]->SetBackColor(ColorScaleRGB(crBackgnd, RGB(255,255,255), 0.1));
208 }
209 else
210 {
212 }
213 }
214
215 for(i = 0; i < nNumCardRegions; i++)
216 {
218 }
219
220
222}
223
225{
226 return crBackgnd;
227}
228
230{
231 CardButton *bptr = 0;
232
233 POINT pt;
234 pt.x = x;
235 pt.y = y;
236
237 //Search BACKWARDS...to reflect the implicit Z-order that
238 //the button creation provided
239 for(int i = nNumButtons - 1; i >= 0; i--)
240 {
241 bptr = Buttons[i];
242 if(PtInRect(&bptr->rect, pt) && bptr->fVisible)
243 return bptr;
244 }
245
246 return 0;
247}
248
250{
251 POINT pt;
252 pt.x = x;
253 pt.y = y;
254
255 //Search BACKWARDS...to reflect the implicit Z-order that
256 //the stack creation provided
257 for(int i = nNumCardRegions - 1; i >= 0; i--)
258 {
259 if(Regions[i]->IsPointInStack(x, y))
260 return Regions[i];
261 }
262
263 return 0;
264}
265
266//
267// Forward all window messages onto the appropriate
268// class instance
269//
271{
273 return cw->WndProc(hwnd, iMsg, wParam, lParam);
274}
275
277{
278 int i;
279 RECT rect;
280 HPALETTE hOldPal;
281
282 hOldPal = UseNicePalette(hdc, __hPalette);
283
284 //
285 // Clip the card stacks so that they won't
286 // get painted over
287 //
288 for(i = 0; i < nNumCardRegions; i++)
289 {
290 Regions[i]->Clip(hdc);
291 }
292
293 //
294 // Clip the buttons
295 //
296 for(i = 0; i < nNumButtons; i++)
297 {
298 Buttons[i]->Clip(hdc);
299 }
300
301
302 // Now paint the whole screen with background colour,
303 //
305
306 //PaintRect(hdc, &rect, MAKE_PALETTERGB(crBackgnd));
307 PaintCardRgn(hdc, 0, 0, rect.right, rect.bottom, 0, 0);
309
310 // Don't let cards draw over buttons, so clip buttons again
311 //
312 for(i = 0; i < nNumButtons; i++)
313 {
314 Buttons[i]->Clip(hdc);
315 }
316
317 // Paint each card stack in turn
318 //
319 for(i = 0; i < nNumCardRegions; i++)
320 {
321 Regions[i]->Render(hdc);
322 }
323
324 // Paint each button now
325 //
327
328 for(i = 0; i < nNumButtons; i++)
329 {
330 Buttons[i]->Redraw();
331 }
332
333 RestorePalette(hdc, hOldPal);
334}
335
336
337
338
340{
341 HDC hdc;
342 PAINTSTRUCT ps;
343
345
346 static CardButton *buttonptr = 0;
347 static CardRegion *stackptr = 0;
348
349 int x, y, i;
350
351 switch(iMsg)
352 {
353 case WM_NCCREATE:
354
355 // When we created this window, we passed in the
356 // pointer to the class object (CardWindow *) in the
357 // call to CreateWindow.
359
360 //
361 // associate this class with the window
362 //
363 SetWindowLongPtr(hwnd, 0, (LONG_PTR)cs->lpCreateParams);
364
365 return 1;
366
367 case WM_NCDESTROY:
368 // Don't delete anything here..
369 break;
370
371 case WM_SIZE:
374
375 //
376 // reposition all the stacks and buttons
377 // in case any of them are centered, right-justified etc
378 //
379 for(i = 0; i < nNumCardRegions; i++)
380 {
382 }
383
384 for(i = 0; i < nNumButtons; i++)
385 {
387 }
388
389 //
390 // Call the user-defined resize proc AFTER all the stacks
391 // have been positioned
392 //
395
396 return 0;
397
398 case WM_PAINT:
399
400 hdc = BeginPaint(hwnd, &ps);
401
402 Paint(hdc);
403
404 EndPaint(hwnd, &ps);
405 return 0;
406
407 case WM_TIMER:
408
409 //find the timer object in the registered funcs
410 /*if(wParam >= 0x10000)
411 {
412 for(i = 0; i < nRegFuncs; i++)
413 {
414 if(RegFuncs[i].id == wParam)
415 {
416 KillTimer(hwnd, wParam);
417
418 //call the registered function!!
419 RegFuncs[i].func(RegFuncs[i].dwParam);
420
421 RegFuncs[i] = RegFuncs[nRegFuncs-1];
422 nRegFuncs--;
423 }
424 }
425 }
426 else*/
427 {
428 //find the cardstack
429 CardRegion *stackobj = (CardRegion *)wParam;//CardStackFromId(wParam);
430 stackobj->DoFlash();
431 }
432
433 return 0;
434
435 case WM_LBUTTONDBLCLK:
436
437 x = (short)LOWORD(lParam);
438 y = (short)HIWORD(lParam);
439
440 if((buttonptr = CardButtonFromPoint(x, y)) != 0)
441 {
442 buttonptr->OnLButtonDown(hwnd, x, y);
443 return 0;
444 }
445
446 if((stackptr = CardRegionFromPoint(x, y)) != 0)
447 {
448 stackptr->OnLButtonDblClk(x, y);
449 stackptr = 0;
450 }
451
452 return 0;
453
454 case WM_LBUTTONDOWN:
455
456 x = (short)LOWORD(lParam);
457 y = (short)HIWORD(lParam);
458
459 //if clicked on a button
460 if((buttonptr = CardButtonFromPoint(x, y)) != 0)
461 {
462 if(buttonptr->OnLButtonDown(hwnd, x, y) == 0)
463 buttonptr = 0;
464
465 return 0;
466 }
467
468 if((stackptr = CardRegionFromPoint(x, y)) != 0)
469 {
470 if(!stackptr->OnLButtonDown(x, y))
471 stackptr = 0;
472 }
473
474 return 0;
475
476 case WM_LBUTTONUP:
477
478 x = (short)LOWORD(lParam);
479 y = (short)HIWORD(lParam);
480
481 //
482 // if we were clicking a button
483 //
484 if(buttonptr != 0)
485 {
486 buttonptr->OnLButtonUp(hwnd, x, y);
487 buttonptr = 0;
488 return 0;
489 }
490
491 if(stackptr != 0)
492 {
493 stackptr->OnLButtonUp(x, y);
494 stackptr = 0;
495 return 0;
496 }
497
498 if ((stackptr = CardRegionFromPoint(x, y)) != 0)
499 {
500 stackptr->ClickRelease(x, y);
501 stackptr = 0;
502 }
503
504 return 0;
505
506 case WM_MOUSEMOVE:
507
508 x = (short)LOWORD(lParam);
509 y = (short)HIWORD(lParam);
510
511 // if we were clicking a button
512 if(buttonptr != 0)
513 {
514 buttonptr->OnMouseMove(hwnd, x, y);
515 return 0;
516 }
517
518 if(stackptr != 0)
519 {
520 return stackptr->OnMouseMove(x, y);
521 }
522
523 return 0;
524
525 }
526
527 return DefWindowProc (hwnd, iMsg, wParam, lParam);
528}
529
530
532{
533 for(int i = 0; i < nNumCardRegions; i++)
534 {
535 if(Regions[i]->id == id)
536 return Regions[i];
537 }
538
539 return 0;
540}
541
543{
544 for(int i = 0; i < nNumButtons; i++)
545 {
546 if(Buttons[i]->id == id)
547 return Buttons[i];
548 }
549
550 return 0;
551}
552
554{
555 InvalidateRect(m_hWnd, 0, 0);
557}
558
560{
561 for(int i = 0; i < nNumButtons; i++)
562 {
563 if(Buttons[i] == pButton)
564 {
566
567 //shift any after this one backwards
568 for(int j = i; j < nNumButtons - 1; j++)
569 {
570 Buttons[j] = Buttons[j + 1];
571 }
572
573 delete cb;
574 nNumButtons--;
575
576 return true;
577 }
578 }
579
580 return false;
581}
582
584{
585 for(int i = 0; i < nNumCardRegions; i++)
586 {
587 if(Regions[i] == pRegion)
588 {
589 CardRegion *cr = Regions[i];
590
591 //shift any after this one backwards
592 for(int j = i; j < nNumCardRegions - 1; j++)
593 {
594 Regions[j] = Regions[j + 1];
595 }
596
597 delete cr;
599
600 return true;
601 }
602 }
603
604 return false;
605}
606
608{
609 for(int i = 0; i < nNumCardRegions; i++)
610 {
611 Regions[i]->Clear();
612 Regions[i]->Update();
613 }
614
615 Redraw();
616}
617
618bool CardWindow::DistributeStacks(int nIdFrom, int nNumStacks, UINT xJustify, int xSpacing, int nStartX)
619{
620 int numvisiblestacks = 0;
621 int curx = nStartX;
622 int startindex = -1;
623 int i;
624
625 //find the stack which starts with our ID
626 for(i = 0; i < nNumCardRegions; i++)
627 {
628 if(Regions[i]->Id() == nIdFrom)
629 {
630 startindex = i;
631 break;
632 }
633 }
634
635 //if didn't find, return
636 if(i == nNumCardRegions) return false;
637
638 //count the stacks that are visible
639 for(i = startindex; i < startindex + nNumStacks; i++)
640 {
641 if(Regions[i]->IsVisible())
642 numvisiblestacks++;
643 }
644
645 if(xJustify == CS_XJUST_CENTER)
646 {
647 //startx -= ((numvisiblestacks + spacing) * cardwidth - spacing) / 2;
648 int viswidth;
649 viswidth = numvisiblestacks * __cardwidth;
650 viswidth += xSpacing * (numvisiblestacks - 1);
651 curx = -(viswidth - __cardwidth) / 2;
652
653 for(i = startindex; i < startindex + nNumStacks; i++)
654 {
655 if(Regions[i]->IsVisible())
656 {
657 Regions[i]->xadjust = curx;
659 curx += Regions[i]->width + xSpacing;
660 }
661
662 }
663 }
664
665 if(xJustify == CS_XJUST_RIGHT)
666 {
667 nStartX -= ((numvisiblestacks + xSpacing) * __cardwidth - xSpacing);
668 }
669
670 if(xJustify == CS_XJUST_NONE)
671 {
672 for(i = startindex; i < startindex + nNumStacks; i++)
673 {
674 if(Regions[i]->IsVisible())
675 {
676 Regions[i]->xpos = curx;
677 curx += Regions[i]->width + xSpacing;
678 Regions[i]->UpdateSize();
679 }
680
681 }
682 }
683
684 return 0;
685}
686
688{
689 for(int i = 0; i < nNumCardRegions; i++)
690 {
692 }
693}
694
695
697{
699}
700
701
703{
704 COLORREF cols[10];
705 int nNumCols;
706
707
708 //include button text colours
709 cols[0] = RGB(0, 0, 0);
710 cols[1] = RGB(255, 255, 255);
711
712 //include the base background colour
713 cols[2] = crBackgnd;
714
715 //include the standard button colours...
719
720 //include the sunken image bitmap colours...
721 GetSinkCols(crBackgnd, &cols[6], &cols[7], &cols[8], &cols[9]);
722
723 nNumCols = 10;
724
725 return MakePaletteFromCols(cols, nNumCols);
726}
727
729{
730 if(uBackIdx >= 52 && uBackIdx <= 68)
731 nBackCardIdx = uBackIdx;
732
733 for(int i = 0; i < nNumCardRegions; i++)
734 Regions[i]->SetBackCardIdx(uBackIdx);
735
736}
737
739{
740 return nBackCardIdx;
741}
742
743void CardWindow::PaintCardRgn(HDC hdc, int dx, int dy, int width, int height, int sx, int sy)
744{
745 RECT rect;
746
747 //if just a solid background colour
748 if(hbmBackImage == 0)
749 {
751
752 /*if(GetVersion() < 0x80000000)
753 {
754 PaintRect(hdc, &rect, MAKE_PALETTERGB(crBackgnd));
755 }
756 else*/
757 {
759 FillRect(hdc, &rect, hbr);
760 DeleteObject(hbr);
761 }
762 }
763 //otherwise, paint using the bitmap
764 else
765 {
766 // Draw whatever part of background we can
768
769 // Now we need to paint any area outside the bitmap,
770 // just in case the bitmap is too small to fill whole window
771 if(0)//sx + width > bm.bmWidth || sy + height > bm.bmHeight)
772 {
773 // Find out size of bitmap
774 BITMAP bm;
775 GetObject(hbmBackImage, sizeof(bm), &bm);
776
777 HRGN hr1 = CreateRectRgn(sx, sy, sx+width, sy+height);
778 HRGN hr2 = CreateRectRgn(0, 0, bm.bmWidth, bm.bmHeight);
779 HRGN hr3 = CreateRectRgn(0,0, 1, 1);
780 HRGN hr4 = CreateRectRgn(0,0, 1, 1);
781
782 CombineRgn(hr3, hr1, hr2, RGN_DIFF);
783
784 GetClipRgn(hdc, hr4);
785
786 CombineRgn(hr3, hr4, hr3, RGN_AND);
787 SelectClipRgn(hdc, hr3);
788
789 // Fill remaining space not filled with bitmap
790 HBRUSH hbr = CreateSolidBrush(crBackgnd);
791 FillRgn(hdc, hr3, hbr);
792 DeleteObject(hbr);
793
794 // Clean up
795 SelectClipRgn(hdc, hr4);
796
797 DeleteObject(hr1);
798 DeleteObject(hr2);
799 DeleteObject(hr3);
800 DeleteObject(hr4);
801 }
802 }
803}
804
806{
807 //delete current image?? NO!
808 if(hdcBackImage == 0)
809 {
811 }
812
814
815 if(hBitmap)
817}
DWORD Id
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
HPALETTE MakePaletteFromCols(COLORREF cols[], int nNumColours)
void GetSinkCols(COLORREF crBase, COLORREF *fg, COLORREF *bg, COLORREF *sh1, COLORREF *sh2)
void FreeCardBitmaps()
void LoadCardBitmaps(void)
Definition: cardbitmaps.cpp:82
HBITMAP CreateSinkBmp(HDC hdcCompat, HDC hdc, COLORREF col, int width, int height)
void RestorePalette(HDC, HPALETTE)
HPALETTE UseNicePalette(HDC, HPALETTE)
Definition: cardwindow.cpp:14
COLORREF ColorScaleRGB(const COLORREF Col1, const COLORREF Col2, const double Ratio)
Definition: cardcolor.cpp:154
#define MAKE_PALETTERGB(colref)
Definition: cardcolor.h:17
int __cardwidth
Definition: cardlib.cpp:25
HPALETTE __hPalette
Definition: cardlib.cpp:28
HPALETTE __holdplacepal
Definition: cardlib.cpp:23
HBITMAP __hbmPlaceHolder
Definition: cardlib.cpp:22
HDC __hdcPlaceHolder
Definition: cardlib.cpp:21
int __cardheight
Definition: cardlib.cpp:26
void(CARDLIBPROC * pResizeWndProc)(int width, int height)
Definition: cardlib.h:91
#define CS_XJUST_CENTER
Definition: cardlib.h:39
#define CS_XJUST_RIGHT
Definition: cardlib.h:38
#define CB_PUSHBUTTON
Definition: cardlib.h:46
#define CS_XJUST_NONE
Definition: cardlib.h:37
HPALETTE UseNicePalette(HDC hdc, HPALETTE hPalette)
Definition: cardwindow.cpp:14
static TCHAR szCardName[]
Definition: cardwindow.cpp:37
HPALETTE MakePaletteFromCols(COLORREF cols[], int nNumColours)
void LoadCardBitmaps()
Definition: cardbitmaps.cpp:82
void GetSinkCols(COLORREF crBase, COLORREF *fg, COLORREF *bg, COLORREF *sh1, COLORREF *sh2)
HPALETTE __holdplacepal
Definition: cardlib.cpp:23
static bool fRegistered
Definition: cardwindow.cpp:38
void FreeCardBitmaps()
void PaintRect(HDC hdc, RECT *rect, COLORREF colour)
Definition: cardlib.cpp:116
void RegisterCardWindow()
Definition: cardwindow.cpp:42
HBITMAP CreateSinkBmp(HDC hdcCompat, HDC hdc, COLORREF col, int width, int height)
static LONG uCardBitmapRef
Definition: cardwindow.cpp:39
int OnMouseMove(HWND hwnd, int x, int y)
Definition: cardbutton.cpp:278
RECT rect
Definition: cardbutton.h:70
static COLORREF GetHighlight(COLORREF crBase)
Definition: cardbutton.cpp:415
static COLORREF GetShadow(COLORREF crBase)
Definition: cardbutton.cpp:421
int OnLButtonUp(HWND hwnd, int x, int y)
Definition: cardbutton.cpp:301
void SetBackColor(COLORREF cr)
Definition: cardbutton.cpp:403
void Redraw()
Definition: cardbutton.cpp:385
void AdjustPosition(int winwidth, int winheight)
Definition: cardbutton.cpp:208
static COLORREF GetFace(COLORREF crBase)
Definition: cardbutton.cpp:426
void Clip(HDC hdc)
Definition: cardbutton.cpp:102
int OnLButtonDown(HWND hwnd, int x, int y)
Definition: cardbutton.cpp:253
bool fVisible
Definition: cardbutton.h:73
void SetBackColor(COLORREF cr)
Definition: cardregion.cpp:67
void UpdateSize()
Definition: cardregion.cpp:83
void DoFlash()
Definition: cardregion.cpp:344
void Clip(HDC hdc)
void ClickRelease(int x, int y)
bool OnLButtonDblClk(int x, int y)
bool OnMouseMove(int x, int y)
int xjustify
Definition: cardregion.h:159
bool OnLButtonUp(int x, int y)
void AdjustPosition(int winwidth, int winheight)
Definition: cardregion.cpp:281
void Render(HDC hdc)
void Update()
Definition: cardregion.cpp:207
void Clear()
Definition: cardregion.h:84
bool OnLButtonDown(int x, int y)
bool DistributeStacks(int nIdFrom, int nNumStacks, UINT xJustify, int xSpacing, int nStartX)
Definition: cardwindow.cpp:618
HPALETTE CreateCardPalette()
Definition: cardwindow.cpp:702
void Update(void)
Definition: cardwindow.cpp:687
void SetResizeProc(pResizeWndProc proc)
Definition: cardwindow.cpp:696
HDC hdcBackImage
Definition: cardwindow.h:97
void Paint(HDC hdc)
Definition: cardwindow.cpp:276
UINT nBackCardIdx
Definition: cardwindow.h:94
CardButton * Buttons[MAXBUTTONS]
Definition: cardwindow.h:100
COLORREF crBackgnd
Definition: cardwindow.h:109
CardRegion * CardRegionFromId(int id)
Definition: cardwindow.cpp:531
BOOL Destroy()
Definition: cardwindow.cpp:123
void SetBackImage(HBITMAP hBitmap)
Definition: cardwindow.cpp:805
pResizeWndProc ResizeWndCallback
Definition: cardwindow.h:111
CardButton * CardButtonFromPoint(int x, int y)
Definition: cardwindow.cpp:229
int nNumDropZones
Definition: cardwindow.h:107
void SetBackColor(COLORREF cr)
Definition: cardwindow.cpp:176
static LRESULT CALLBACK CardWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
Definition: cardwindow.cpp:270
HBITMAP hbmBackImage
Definition: cardwindow.h:96
void PaintCardRgn(HDC hdc, int dx, int dy, int width, int height, int sx, int sy)
Definition: cardwindow.cpp:743
int nNumButtons
Definition: cardwindow.h:101
BOOL Create(HWND hwndParent, DWORD dwExStyle, DWORD dwStyle, int x, int y, int width, int height)
Definition: cardwindow.cpp:109
UINT GetBackCardIdx()
Definition: cardwindow.cpp:738
LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
Definition: cardwindow.cpp:339
bool DeleteButton(CardButton *pButton)
Definition: cardwindow.cpp:559
HWND m_hWnd
Definition: cardwindow.h:91
int nHeight
Definition: cardwindow.h:92
CardButton * CardButtonFromId(int id)
Definition: cardwindow.cpp:542
COLORREF GetBackColor()
Definition: cardwindow.cpp:224
void EmptyStacks(void)
Definition: cardwindow.cpp:607
friend void RegisterCardWindow()
Definition: cardwindow.cpp:42
CardRegion * Regions[MAXCARDSTACKS]
Definition: cardwindow.h:103
DropZone * dropzone[MAXDROPZONES]
Definition: cardwindow.h:106
void SetBackCardIdx(UINT uBackIdx)
Definition: cardwindow.cpp:728
bool DeleteAll()
Definition: cardwindow.cpp:152
int nNumCardRegions
Definition: cardwindow.h:104
void Redraw(void)
Definition: cardwindow.cpp:553
int nWidth
Definition: cardwindow.h:92
CardRegion * CardRegionFromPoint(int x, int y)
Definition: cardwindow.cpp:249
bool DeleteRegion(CardRegion *pRegion)
Definition: cardwindow.cpp:583
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static HWND hwndParent
Definition: cryptui.c:300
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static HBITMAP hBitmap
Definition: timezone.c:26
#define CALLBACK
Definition: compat.h:35
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:94
#define pt(x, y)
Definition: drawing.c:79
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
Definition: common.c:57
#define RGB(r, g, b)
Definition: precomp.h:71
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
pKey DeleteObject()
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define cs
Definition: i386-dis.c:442
void __cdecl srand(_In_ unsigned int _Seed)
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97
HDC hdc
Definition: main.c:9
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:92
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
static HANDLE proc()
Definition: pdb.c:34
#define LOWORD(l)
Definition: pedump.c:82
long LONG
Definition: pedump.c:60
#define DefWindowProc
Definition: ros2win.h:31
& rect
Definition: startmenu.cpp:1413
Definition: bl.h:1331
int cbClsExtra
Definition: winuser.h:3204
HINSTANCE hInstance
Definition: winuser.h:3206
HCURSOR hCursor
Definition: winuser.h:3208
LPCSTR lpszMenuName
Definition: winuser.h:3210
HICON hIconSm
Definition: winuser.h:3212
UINT style
Definition: winuser.h:3202
int cbWndExtra
Definition: winuser.h:3205
UINT cbSize
Definition: winuser.h:3201
WNDPROC lpfnWndProc
Definition: winuser.h:3203
LPCSTR lpszClassName
Definition: winuser.h:3211
HICON hIcon
Definition: winuser.h:3207
HBRUSH hbrBackground
Definition: winuser.h:3209
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
#define HIWORD(l)
Definition: typedefs.h:247
#define _T(x)
Definition: vfdio.h:22
#define GetModuleHandle
Definition: winbase.h:3827
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
DWORD COLORREF
Definition: windef.h:300
UINT WINAPI RealizePalette(_In_ HDC)
Definition: palette.c:138
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
#define RGN_DIFF
Definition: wingdi.h:358
HPALETTE WINAPI SelectPalette(_In_ HDC, _In_ HPALETTE, _In_ BOOL)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
int WINAPI GetClipRgn(_In_ HDC, _In_ HRGN)
int WINAPI CombineRgn(_In_opt_ HRGN hrgnDest, _In_opt_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ int fnCombineMode)
#define PALETTERGB(r, g, b)
Definition: wingdi.h:2942
#define RGN_AND
Definition: wingdi.h:356
#define SRCCOPY
Definition: wingdi.h:333
int WINAPI FillRgn(_In_ HDC, _In_ HRGN, _In_ HBRUSH)
Definition: painting.c:183
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
#define GetObject
Definition: wingdi.h:4468
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN)
#define WM_PAINT
Definition: winuser.h:1620
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define CS_VREDRAW
Definition: winuser.h:658
#define CreateWindowEx
Definition: winuser.h:5755
#define WM_SIZE
Definition: winuser.h:1611
#define WM_LBUTTONDBLCLK
Definition: winuser.h:1778
#define CS_HREDRAW
Definition: winuser.h:653
#define IDC_ARROW
Definition: winuser.h:687
#define WM_MOUSEMOVE
Definition: winuser.h:1775
#define CS_DBLCLKS
Definition: winuser.h:651
#define WM_LBUTTONDOWN
Definition: winuser.h:1776
#define WM_NCCREATE
Definition: winuser.h:1683
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define RegisterClassEx
Definition: winuser.h:5837
#define WM_TIMER
Definition: winuser.h:1742
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI UpdateWindow(_In_ HWND)
#define LoadCursor
Definition: winuser.h:5812
HDC WINAPI GetDC(_In_opt_ HWND)
#define WM_LBUTTONUP
Definition: winuser.h:1777
#define WM_NCDESTROY
Definition: winuser.h:1684
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
char TCHAR
Definition: xmlstorage.h:189