-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfontdlg.h
More file actions
77 lines (53 loc) · 2.03 KB
/
Copy pathfontdlg.h
File metadata and controls
77 lines (53 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*++
Copyright (c) Microsoft Corporation.
Licensed under the MIT license.
Module Name:
fontdlg.h
Abstract:
This module contains the definitions for console font dialog
Author:
Therese Stowell (thereses) Feb-3-1992 (swiped from Win3.1)
Revision History:
--*/
#pragma once
#ifndef FONTDLG_H
#define FONTDLG_H
/* ----- Literals ----- */
#define MAXDIMENSTRING 40 // max text in combo box
#define DX_TTBITMAP 20
#define DY_TTBITMAP 12
#define CCH_RASTERFONTS 24
#define CCH_SELECTEDFONT 30
/* ----- Macros ----- */
/*
* High-level macros
*
* These macros handle the SendMessages that go tofrom list boxes
* and combo boxes.
*
* The "xxx_lcb" prefix stands for leaves CritSect & "list or combo box".
*
* Basically, we're providing mnemonic names for what would otherwise
* look like a whole slew of confusing SendMessage's.
*
*/
#define lcbRESETCONTENT(hWnd, bLB) \
SendMessage(hWnd, bLB ? LB_RESETCONTENT : CB_RESETCONTENT, 0, 0L)
#define lcbGETTEXT(hWnd, bLB, w) \
SendMessage(hWnd, bLB ? LB_GETTEXT : CB_GETLBTEXT, w, 0L)
#define lcbFINDSTRINGEXACT(hWnd, bLB, pwsz) \
(LONG)SendMessage(hWnd, bLB ? LB_FINDSTRINGEXACT : CB_FINDSTRINGEXACT, \
(WPARAM)-1, (LPARAM)pwsz)
#define lcbADDSTRING(hWnd, bLB, pwsz) \
(LONG)SendMessage(hWnd, bLB ? LB_ADDSTRING : CB_ADDSTRING, 0, (LPARAM)pwsz)
#define lcbSETITEMDATA(hWnd, bLB, w, nFont) \
SendMessage(hWnd, bLB ? LB_SETITEMDATA : CB_SETITEMDATA, w, nFont)
#define lcbGETITEMDATA(hWnd, bLB, w) \
(LONG)SendMessage(hWnd, bLB ? LB_GETITEMDATA : CB_GETITEMDATA, w, 0L)
#define lcbGETCOUNT(hWnd, bLB) \
(LONG)SendMessage(hWnd, bLB ? LB_GETCOUNT : CB_GETCOUNT, 0, 0L)
#define lcbGETCURSEL(hWnd, bLB) \
(LONG)SendMessage(hWnd, bLB ? LB_GETCURSEL : CB_GETCURSEL, 0, 0L)
#define lcbSETCURSEL(hWnd, bLB, w) \
SendMessage(hWnd, bLB ? LB_SETCURSEL : CB_SETCURSEL, w, 0L)
#endif /* #ifndef FONTDLG_H */