22 #ifndef BAGEL_MFC_WINGDI_H 23 #define BAGEL_MFC_WINGDI_H 25 #include "bagel/mfc/minwindef.h" 32 #define PALETTEINDEX(i) ((COLORREF)(0x01000000 | (uint32)(uint16)(i))) 37 #define CS_VREDRAW 0x0001 38 #define CS_HREDRAW 0x0002 39 #define CS_DBLCLKS 0x0008 40 #define CS_OWNDC 0x0020 41 #define CS_CLASSDC 0x0040 42 #define CS_PARENTDC 0x0080 43 #define CS_NOCLOSE 0x0200 44 #define CS_SAVEBITS 0x0800 45 #define CS_BYTEALIGNCLIENT 0x1000 46 #define CS_BYTEALIGNWINDOW 0x2000 47 #define CS_GLOBALCLASS 0x4000 50 #define DRIVERVERSION 0 63 #define PDEVICESIZE 26 66 #define POLYGONALCAPS 32 77 #define SIZEPALETTE 104 78 #define NUMRESERVED 106 83 #define PHYSICALWIDTH 110 84 #define PHYSICALHEIGHT 111 85 #define PHYSICALOFFSETX 112 86 #define PHYSICALOFFSETY 113 87 #define SCALINGFACTORX 114 88 #define SCALINGFACTORY 115 94 #define DESKTOPVERTRES 117 96 #define DESKTOPHORZRES 118 98 #define BLTALIGNMENT 119 99 #define SHADEBLENDCAPS 120 100 #define COLORMGMTCAPS 121 108 #define RC_BITMAP64 8 109 #define RC_GDI20_OUTPUT 0x0010 110 #define RC_GDI20_STATE 0x0020 111 #define RC_SAVEBITMAP 0x0040 112 #define RC_DI_BITMAP 0x0080 113 #define RC_PALETTE 0x0100 114 #define RC_DIBTODEV 0x0200 115 #define RC_BIGFONT 0x0400 116 #define RC_STRETCHBLT 0x0800 117 #define RC_FLOODFILL 0x1000 118 #define RC_STRETCHDIB 0x2000 119 #define RC_OP_DX_OUTPUT 0x4000 120 #define RC_DEVBITS 0x8000 123 #define SRCCOPY (uint32)0x00CC0020 124 #define SRCPAINT (uint32)0x00EE0086 125 #define SRCAND (uint32)0x008800C6 126 #define SRCINVERT (uint32)0x00660046 127 #define SRCERASE (uint32)0x00440328 128 #define NOTSRCCOPY (uint32)0x00330008 129 #define NOTSRCERASE (uint32)0x001100A6 130 #define MERGECOPY (uint32)0x00C000CA 131 #define MERGEPAINT (uint32)0x00BB0226 132 #define PATCOPY (uint32)0x00F00021 133 #define PATPAINT (uint32)0x00FB0A09 134 #define PATINVERT (uint32)0x005A0049 135 #define DSTINVERT (uint32)0x00550009 136 #define BLACKNESS (uint32)0x00000042 137 #define WHITENESS (uint32)0x00FF0062 138 #define NOMIRRORBITMAP (uint32)0x80000000 139 #define CAPTUREBLT (uint32)0x40000000 142 #define BLACKONWHITE 1 143 #define WHITEONBLACK 2 144 #define COLORONCOLOR 3 146 #define MAXSTRETCHBLTMODE 4 149 #define DIB_RGB_COLORS 0 150 #define DIB_PAL_COLORS 1 153 #define CBM_INIT 0x04L 159 #define SW_SHOWNORMAL 1 161 #define SW_SHOWMINIMIZED 2 162 #define SW_SHOWMAXIMIZED 3 163 #define SW_MAXIMIZE 3 164 #define SW_SHOWNOACTIVATE 4 166 #define SW_MINIMIZE 6 167 #define SW_SHOWMINNOACTIVE 7 170 #define SW_SHOWDEFAULT 10 171 #define SW_FORCEMINIMIZE 11 175 #define GWW_HINSTANCE (-6) 178 #define FF_DONTCARE (0<<4) 179 #define FF_ROMAN (1<<4) 181 #define FF_SWISS (2<<4) 183 #define FF_MODERN (3<<4) 185 #define FF_SCRIPT (4<<4) 186 #define FF_DECORATIVE (5<<4) 201 FW_ULTRALIGHT = FW_EXTRALIGHT,
202 FW_REGULAR = FW_NORMAL,
203 FW_DEMIBOLD = FW_SEMIBOLD,
204 FW_ULTRABOLD = FW_EXTRABOLD,
209 #define OUT_DEFAULT_PRECIS 0 210 #define OUT_STRING_PRECIS 1 211 #define OUT_CHARACTER_PRECIS 2 212 #define OUT_STROKE_PRECIS 3 213 #define OUT_TT_PRECIS 4 214 #define OUT_DEVICE_PRECIS 5 215 #define OUT_RASTER_PRECIS 6 216 #define OUT_TT_ONLY_PRECIS 7 217 #define OUT_OUTLINE_PRECIS 8 218 #define OUT_SCREEN_OUTLINE_PRECIS 9 219 #define OUT_PS_ONLY_PRECIS 10 221 #define DEFAULT_QUALITY 0 222 #define DRAFT_QUALITY 1 223 #define PROOF_QUALITY 2 224 #define NONANTIALIASED_QUALITY 3 225 #define ANTIALIASED_QUALITY 4 228 #define TRANSPARENT 1 230 #define BKMODE_LAST 2 235 #define BS_PUSHBUTTON 0x00000000L 236 #define BS_DEFPUSHBUTTON 0x00000001L 237 #define BS_CHECKBOX 0x00000002L 238 #define BS_AUTOCHECKBOX 0x00000003L 239 #define BS_RADIOBUTTON 0x00000004L 240 #define BS_3STATE 0x00000005L 241 #define BS_AUTO3STATE 0x00000006L 242 #define BS_GROUPBOX 0x00000007L 243 #define BS_USERBUTTON 0x00000008L 244 #define BS_AUTORADIOBUTTON 0x00000009L 245 #define BS_PUSHBOX 0x0000000AL 246 #define BS_OWNERDRAW 0x0000000BL 247 #define BS_TYPEMASK 0x0000000FL 248 #define BS_LEFTTEXT 0x00000020L 249 #define BS_TEXT 0x00000000L 250 #define BS_ICON 0x00000040L 251 #define BS_BITMAP 0x00000080L 252 #define BS_LEFT 0x00000100L 253 #define BS_RIGHT 0x00000200L 254 #define BS_CENTER 0x00000300L 255 #define BS_TOP 0x00000400L 256 #define BS_BOTTOM 0x00000800L 257 #define BS_VCENTER 0x00000C00L 258 #define BS_PUSHLIKE 0x00001000L 259 #define BS_MULTILINE 0x00002000L 260 #define BS_NOTIFY 0x00004000L 261 #define BS_FLAT 0x00008000L 262 #define BS_RIGHTBUTTON BS_LEFTTEXT 267 #define MAKEINTRESOURCE(i) ((char *)((uintptr)((uint16)(i)))) 270 #define IDC_ARROW MAKEINTRESOURCE(32512) 271 #define IDC_IBEAM MAKEINTRESOURCE(32513) 272 #define IDC_WAIT MAKEINTRESOURCE(32514) 273 #define IDC_CROSS MAKEINTRESOURCE(32515) 274 #define IDC_UPARROW MAKEINTRESOURCE(32516) 275 #define IDC_SIZE MAKEINTRESOURCE(32640) 276 #define IDC_ICON MAKEINTRESOURCE(32641) 277 #define IDC_SIZENWSE MAKEINTRESOURCE(32642) 278 #define IDC_SIZENESW MAKEINTRESOURCE(32643) 279 #define IDC_SIZEWE MAKEINTRESOURCE(32644) 280 #define IDC_SIZENS MAKEINTRESOURCE(32645) 281 #define IDC_SIZEALL MAKEINTRESOURCE(32646) 282 #define IDC_NO MAKEINTRESOURCE(32648) 283 #define IDC_HAND MAKEINTRESOURCE(32649) 284 #define IDC_APPSTARTING MAKEINTRESOURCE(32650) 285 #define IDC_HELP MAKEINTRESOURCE(32651) 292 ODS_SELECTED = 0x0001,
293 ODS_ENABLED = 0x0002,
294 ODS_DISABLED = 0x0004,
295 ODS_GRAYED = ODS_DISABLED,
296 ODS_CHECKED = 0x0008,
298 ODS_DEFAULT = 0x0020,
299 ODS_COMBOBOXEDIT = 0x1000,
300 ODS_HOTLIGHT = 0x0040,
301 ODS_INACTIVE = 0x0080,
302 ODS_NOACCEL = 0x0100,
303 ODS_NOFOCUSRECT = 0x0200
309 BST_INDETERMINATE = 2,
315 #define WHITE_BRUSH 0 316 #define LTGRAY_BRUSH 1 318 #define DKGRAY_BRUSH 3 319 #define BLACK_BRUSH 4 321 #define HOLLOW_BRUSH NULL_BRUSH 325 #define OEM_FIXED_FONT 10 326 #define ANSI_FIXED_FONT 11 327 #define ANSI_VAR_FONT 12 328 #define SYSTEM_FONT 13 329 #define DEVICE_DEFAULT_FONT 14 330 #define DEFAULT_PALETTE 15 331 #define SYSTEM_FIXED_FONT 16 339 #define PS_DASHDOTDOT 4 341 #define PS_INSIDEFRAME 6 342 #define PS_USERSTYLE 7 343 #define PS_ALTERNATE 8 344 #define PS_STYLE_MASK 0x0000000F 350 #define BM_GETCHECK 0x00F0 351 #define BM_SETCHECK 0x00F1 352 #define BM_GETSTATE 0x00F2 353 #define BM_SETSTATE 0x00F3 354 #define BM_SETSTYLE 0x00F4 355 #define BM_CLICK 0x00F5 356 #define BM_GETIMAGE 0x00F6 357 #define BM_SETIMAGE 0x00F7 358 #define BM_SETDONTCLICK 0x00F8 364 #define ODT_LISTBOX 2 365 #define ODT_COMBOBOX 3 372 #define ODA_DRAWENTIRE 0x0001 373 #define ODA_SELECT 0x0002 374 #define ODA_FOCUS 0x0004 380 #define CTLCOLOR_MSGBOX 0 381 #define CTLCOLOR_EDIT 1 382 #define CTLCOLOR_LISTBOX 2 383 #define CTLCOLOR_BTN 3 384 #define CTLCOLOR_DLG 4 385 #define CTLCOLOR_SCROLLBAR 5 386 #define CTLCOLOR_STATIC 6 387 #define CTLCOLOR_MAX 7 389 #define COLOR_SCROLLBAR 0 390 #define COLOR_BACKGROUND 1 391 #define COLOR_ACTIVECAPTION 2 392 #define COLOR_INACTIVECAPTION 3 394 #define COLOR_WINDOW 5 395 #define COLOR_WINDOWFRAME 6 396 #define COLOR_MENUTEXT 7 397 #define COLOR_WINDOWTEXT 8 398 #define COLOR_CAPTIONTEXT 9 399 #define COLOR_ACTIVEBORDER 10 400 #define COLOR_INACTIVEBORDER 11 401 #define COLOR_APPWORKSPACE 12 402 #define COLOR_HIGHLIGHT 13 403 #define COLOR_HIGHLIGHTTEXT 14 404 #define COLOR_BTNFACE 15 405 #define COLOR_BTNSHADOW 16 406 #define COLOR_GRAYTEXT 17 407 #define COLOR_BTNTEXT 18 408 #define COLOR_INACTIVECAPTIONTEXT 19 409 #define COLOR_BTNHIGHLIGHT 20 410 #define COLOR_3DDKSHADOW 21 411 #define COLOR_3DLIGHT 22 412 #define COLOR_INFOTEXT 23 413 #define COLOR_INFOBK 24 414 #define COLOR_HOTLIGHT 26 415 #define COLOR_GRADIENTACTIVECAPTION 27 416 #define COLOR_GRADIENTINACTIVECAPTION 28 417 #define COLOR_MENUHILIGHT 29 418 #define COLOR_MENUBAR 30 419 #define COLOR_DESKTOP COLOR_BACKGROUND 420 #define COLOR_3DFACE COLOR_BTNFACE 421 #define COLOR_3DSHADOW COLOR_BTNSHADOW 422 #define COLOR_3DHIGHLIGHT COLOR_BTNHIGHLIGHT 423 #define COLOR_3DHILIGHT COLOR_BTNHIGHLIGHT 424 #define COLOR_BTNHILIGHT COLOR_BTNHIGHLIGHT 427 #define BLACKONWHITE 1 428 #define WHITEONBLACK 2 429 #define COLORONCOLOR 3 431 #define MAXSTRETCHBLTMODE 4 432 #define STRETCH_ANDSCANS BLACKONWHITE 433 #define STRETCH_ORSCANS WHITEONBLACK 434 #define STRETCH_DELETESCANS COLORONCOLOR 435 #define STRETCH_HALFTONE HALFTONE 439 #define R2_NOTMERGEPEN 2 440 #define R2_MASKNOTPEN 3 441 #define R2_NOTCOPYPEN 4 442 #define R2_MASKPENNOT 5 445 #define R2_NOTMASKPEN 8 447 #define R2_NOTXORPEN 10 449 #define R2_MERGENOTPEN 12 450 #define R2_COPYPEN 13 451 #define R2_MERGEPENNOT 14 452 #define R2_MERGEPEN 15 459 #define BS_HOLLOW BS_NULL 463 #define BS_DIBPATTERN 5 464 #define BS_DIBPATTERNPT 6 465 #define BS_PATTERN8X8 7 466 #define BS_DIBPATTERN8X8 8 467 #define BS_MONOPATTERN 9 470 #define PC_RESERVED 0x01 471 #define PC_EXPLICIT 0x02 472 #define PC_NOCOLLAPSE 0x04 477 #define DT_TOP 0x00000000 478 #define DT_LEFT 0x00000000 479 #define DT_CENTER 0x00000001 480 #define DT_RIGHT 0x00000002 481 #define DT_VCENTER 0x00000004 482 #define DT_BOTTOM 0x00000008 483 #define DT_WORDBREAK 0x00000010 484 #define DT_SINGLELINE 0x00000020 485 #define DT_EXPANDTABS 0x00000040 486 #define DT_TABSTOP 0x00000080 487 #define DT_NOCLIP 0x00000100 488 #define DT_EXTERNALLEADING 0x00000200 489 #define DT_CALCRECT 0x00000400 490 #define DT_NOPREFIX 0x00000800 491 #define DT_INTERNAL 0x00001000 494 #define TA_NOUPDATECP 0 495 #define TA_UPDATECP 1 503 #define TA_BASELINE 24 508 #define MF_INSERT 0x00000000L 509 #define MF_CHANGE 0x00000080L 510 #define MF_APPEND 0x00000100L 511 #define MF_DELETE 0x00000200L 512 #define MF_REMOVE 0x00001000L 514 #define MF_BYCOMMAND 0x00000000L 515 #define MF_BYPOSITION 0x00000400L 516 #define MF_SEPARATOR 0x00000800L 517 #define MF_ENABLED 0x00000000L 518 #define MF_GRAYED 0x00000001L 519 #define MF_DISABLED 0x00000002L 520 #define MF_UNCHECKED 0x00000000L 521 #define MF_CHECKED 0x00000008L 522 #define MF_USECHECKBITMAPS 0x00000200L 523 #define MF_STRING 0x00000000L 524 #define MF_BITMAP 0x00000004L 525 #define MF_OWNERDRAW 0x00000100L 526 #define MF_POPUP 0x00000010L 527 #define MF_MENUBARBREAK 0x00000020L 528 #define MF_MENUBREAK 0x00000040L 529 #define MF_UNHILITE 0x00000000L 530 #define MF_HILITE 0x00000080L 533 #define HS_HORIZONTAL 0 534 #define HS_VERTICAL 1 535 #define HS_FDIAGONAL 2 536 #define HS_BDIAGONAL 3 538 #define HS_DIAGCROSS 5 544 #define TMPF_FIXED_PITCH 0x01 545 #define TMPF_VECTOR 0x02 546 #define TMPF_DEVICE 0x08 547 #define TMPF_TRUETYPE 0x04 549 #define ANSI_CHARSET 0 552 #define BDR_RAISEDOUTER 0x0001 553 #define BDR_SUNKENOUTER 0x0002 554 #define BDR_RAISEDINNER 0x0004 555 #define BDR_SUNKENINNER 0x0008 557 #define BDR_OUTER (BDR_RAISEDOUTER | BDR_SUNKENOUTER) 558 #define BDR_INNER (BDR_RAISEDINNER | BDR_SUNKENINNER) 559 #define BDR_RAISED (BDR_RAISEDOUTER | BDR_RAISEDINNER) 560 #define BDR_SUNKEN (BDR_SUNKENOUTER | BDR_SUNKENINNER) 563 #define EDGE_RAISED (BDR_RAISEDOUTER | BDR_RAISEDINNER) 564 #define EDGE_SUNKEN (BDR_SUNKENOUTER | BDR_SUNKENINNER) 565 #define EDGE_ETCHED (BDR_SUNKENOUTER | BDR_RAISEDINNER) 566 #define EDGE_BUMP (BDR_RAISEDOUTER | BDR_SUNKENINNER) 569 #define BF_LEFT 0x0001 570 #define BF_TOP 0x0002 571 #define BF_RIGHT 0x0004 572 #define BF_BOTTOM 0x0008 574 #define BF_TOPLEFT (BF_TOP | BF_LEFT) 575 #define BF_TOPRIGHT (BF_TOP | BF_RIGHT) 576 #define BF_BOTTOMLEFT (BF_BOTTOM | BF_LEFT) 577 #define BF_BOTTOMRIGHT (BF_BOTTOM | BF_RIGHT) 578 #define BF_RECT (BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM) 580 #define BF_DIAGONAL 0x0010 585 #define BF_DIAGONAL_ENDTOPRIGHT (BF_DIAGONAL | BF_TOP | BF_RIGHT) 586 #define BF_DIAGONAL_ENDTOPLEFT (BF_DIAGONAL | BF_TOP | BF_LEFT) 587 #define BF_DIAGONAL_ENDBOTTOMLEFT (BF_DIAGONAL | BF_BOTTOM | BF_LEFT) 588 #define BF_DIAGONAL_ENDBOTTOMRIGHT (BF_DIAGONAL | BF_BOTTOM | BF_RIGHT) 591 #define BF_MIDDLE 0x0800 592 #define BF_SOFT 0x1000 593 #define BF_ADJUST 0x2000 594 #define BF_FLAT 0x4000 595 #define BF_MONO 0x8000 601 #define HTTRANSPARENT (-1) 607 #define HTSIZE HTGROWBOX 611 #define HTMINBUTTON 8 612 #define HTMAXBUTTON 9 617 #define HTTOPRIGHT 14 619 #define HTBOTTOMLEFT 16 620 #define HTBOTTOMRIGHT 17 622 #define HTREDUCE HTMINBUTTON 623 #define HTZOOM HTMAXBUTTON 624 #define HTSIZEFIRST HTLEFT 625 #define HTSIZELAST HTBOTTOMRIGHT 634 uint32 biCompression;
636 long biXPelsPerMeter;
637 long biYPelsPerMeter;
639 uint32 biClrImportant;
694 uint16 palNumEntries;
703 unsigned int CtlType;
706 unsigned int itemWidth;
707 unsigned int itemHeight;
715 unsigned int CtlType;
718 unsigned int itemAction;
719 unsigned int itemState;
728 unsigned int lbStyle;
733 extern int GetDeviceCaps(HDC hdc,
int index);
734 extern HDC CreateCompatibleDC(HDC hdc);
735 extern int ReleaseDC(
HWND hWnd, HDC hDC);
736 extern bool DeleteDC(HDC hdc);
737 extern bool DeleteObject(
HGDIOBJ ho);
738 extern HDC GetDC(
HWND hWnd);
739 extern int GetObject(HANDLE h,
int c,
void *pv);
743 extern intptr DialogBoxParam(
HINSTANCE hInstance,
744 const char *lpTemplateName,
HWND hWndParent,
745 DLGPROC lpDialogFunc, LPARAM dwInitParam);
746 extern bool IsWindow(
HWND hWnd);
747 extern bool SetWindowText(
HWND hWnd,
const char *lpszString);
748 extern int GetWindowText(
HWND hWnd,
char *lpszStringBuf,
int nMaxCount);
749 extern bool ScreenToClient(
HWND hWnd,
LPPOINT lpPoint);
752 uint32 flInit, CONST
void *pjBits, CONST
BITMAPINFO *pbmi,
unsigned int iUsage);
753 extern int GetDIBits(HDC hdc,
HBITMAP hbm,
unsigned int start,
unsigned int cLines,
754 void *lpvBits, LPBITMAPINFO lpbmi,
unsigned int usage);
757 extern HGDIOBJ GetStockObject(
int i);
759 extern unsigned int RealizePalette(HDC hdc);
760 extern bool BitBlt(HDC hdc,
int xDest,
int yDest,
int width,
int height,
761 HDC hdcSrc,
int xSrc,
int ySrc, uint32 rop);
762 extern bool StretchBlt(HDC hdcDest,
int xDest,
int yDest,
763 int wDest,
int hDest, HDC hdcSrc,
int xSrc,
int ySrc,
int wSrc,
int hSrc, uint32 rop);
764 extern int SetStretchBltMode(HDC hdc,
int mode);
765 extern int StretchDIBits(HDC hdc,
int xDest,
int yDest,
int DestWidth,
int DestHeight,
766 int xSrc,
int ySrc,
int SrcWidth,
int SrcHeight,
767 CONST
void *lpBits, CONST
BITMAPINFO *lpbmi,
unsigned int iUsage, uint32 rop);
768 extern int GetTextExtent(HDC hdc,
const char *text,
size_t len);
770 extern intptr GetWindowWord(
HWND hWnd,
int nIndex);
771 extern int AddFontResource(
const char *fontName);
772 extern bool RemoveFontResource(
const char *fontName);
773 extern int SetScrollPos(
HWND hWnd,
int nBar,
774 int nPos,
bool bRedraw);
775 extern void SetScrollRange(
HWND hWnd,
int nBar,
776 int nMinPos,
int nMaxPos,
bool bRedraw);
778 extern bool ClipCursor(
const RECT *lpRect);
779 extern bool GetCursorPos(
LPPOINT lpPoint);
780 extern bool SetCursorPos(
int x,
int y);
781 extern bool SetCapture(
HWND hWnd);
782 extern bool ReleaseCapture();
783 extern HWND GetCapture();
784 extern HCURSOR LoadCursor(
HINSTANCE hInstance,
785 const char *lpCursorName);
786 extern HCURSOR SetCursor(HCURSOR hCursor);
787 extern int ShowCursor(
bool bShow);
789 typedef void (CALLBACK *LINEDDAPROC)(
int x,
int y,
CDC *cdc);
790 extern bool LineDDA(
int x0,
int y0,
int x1,
int y1,
791 LINEDDAPROC lpProc,
CDC *cdc);
793 extern byte GetRValue(COLORREF color);
794 extern byte GetGValue(COLORREF color);
795 extern byte GetBValue(COLORREF color);
797 extern HWND GetDlgItem(
HWND hDlg,
int nIDDlgItem);
798 extern bool EndDialog(
HWND hDlg, intptr nResult);
799 extern bool SetDlgItemInt(
HWND hDlg,
int nIDDlgItem,
800 unsigned int uValue,
bool bSigned);
801 extern bool CheckRadioButton(
HWND hDlg,
int nIDFirstButton,
802 int nIDLastButton,
int nIDCheckButton);
804 extern uint32 GetSysColor(
int nIndex);
805 extern HBRUSH GetSysColorBrush(
int nIndex);
806 extern bool DestroyMenu(HMENU hMenu);
807 extern void SetActiveWindow(
HWND hWnd);
Definition: afxwin.h:1125
Definition: minwindef.h:86
Definition: minwindef.h:160
Definition: minwindef.h:238
Definition: minwindef.h:150
Definition: minwindef.h:178