uLib  User mode C/C++ extended API library for Win32 programmers.
DlgPlate.h
Go to the documentation of this file.
1 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 // Project: uLib - User mode utility library.
3 // Module: Dialog "memory templates" support.
4 // Author: Copyright (c) Love Nystrom
5 // License: NNOSL (BSD descendant, see NNOSL.txt in the base directory).
6 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 
8 #ifndef __DlgPlate_h_incl__
9 #define __DlgPlate_h_incl__
10 
11 #include <uLib/Common.h>
12 
14 
26 
27 // Little endian composite ordinal definitions for predefined control classes.
28 
29 #define ORD_BUTTON 0x0080ffff
30 #define ORD_EDIT 0x0081ffff
31 #define ORD_STATIC 0x0082ffff
32 #define ORD_LISTBOX 0x0083ffff
33 #define ORD_SCROLLBAR 0x0084ffff
34 #define ORD_COMBOBOX 0x0085ffff
35 
36 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 // Legacy dialog templates (WinUser.h)
38 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39 
42 
43 LPDLGTEMPLATE AllocDlgTemplate( WORD Size );
44 
46 
47 void FreeDlgTemplate( LPDLGTEMPLATE pDlg );
48 
52 
53 LPDLGITEMTEMPLATE SetDlgStyle(
54  LPDLGTEMPLATE pBuf,
55  DWORD Style,
56  short X, short Y,
57  short W, short H,
58  LPCWSTR Caption,
59  WORD nCtls,
60  LPCWSTR Font,
61  WORD Points
62  );
63 
67 
68 LPDLGITEMTEMPLATE AddDlgItem(
69  LPDLGITEMTEMPLATE pBuf,
70  DWORD Type,
71  DWORD Style,
72  DWORD ExStyle,
73  short X, short Y,
74  short W, short H,
75  LPCWSTR Caption,
76  WORD Id
77  );
78 
79 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 // Extended dialog templates
81 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
82 
83 #pragma pack( push,1 )
84 
98 typedef struct _dlgTemplateEx
99 {
106  short x;
107  short y;
108  short cx;
109  short cy;
110  //
111  // Everything else in this structure is variable length...
112  //
113 }
116 
125 
126 typedef struct _dlgItemTemplateEx
127 {
131  short x;
132  short y;
133  short cx;
134  short cy;
136  //
137  // Everything else in this structure is variable length...
138  //
139 }
142 #pragma pack(pop)
143 
146 
148 
150 
151 void FreeExDlgTemplate( PDLGTEMPLATEEX pDlg );
152 
156 
158  PDLGTEMPLATEEX pBuf,
159  DWORD Style,
160  short X, short Y,
161  short W, short H,
162  LPCWSTR Caption,
163  DWORD HelpId,
164  WORD nCtls,
165  LPCWSTR Font,
166  short Points,
167  short Weight DEF_(FW_NORMAL),
168  BYTE CharSet DEF_(DEFAULT_CHARSET)
169  );
170 
174 
176  PDLGITEMTEMPLATEEX pBuf,
177  DWORD Type,
178  DWORD Style,
179  DWORD ExStyle,
180  short X, short Y,
181  short W, short H,
182  LPCWSTR Caption,
183  WORD Id,
184  DWORD HelpId
185  );
186 
189 #endif//ndef __DlgPlate_h_incl__
190 // EOF
unsigned long DWORD
Definition: Common.h:414
void FreeDlgTemplate(LPDLGTEMPLATE pDlg)
Definition: DlgPlate.cpp:44
unsigned short WORD
Definition: Common.h:413
WORD signature
Definition: DlgPlate.h:101
WORD cDlgItems
Definition: DlgPlate.h:105
DWORD helpId
Definition: DlgPlate.h:102
LPDLGITEMTEMPLATE SetDlgStyle(LPDLGTEMPLATE pBuf, DWORD Style, short X, short Y, short W, short H, LPCWSTR Caption, WORD nCtls, LPCWSTR Font, WORD Points)
Definition: DlgPlate.cpp:57
DLGTEMPLATEEX * PDLGTEMPLATEEX
Definition: DlgPlate.h:115
DWORD exStyle
Definition: DlgPlate.h:103
DLGITEMTEMPLATEEX * PDLGITEMTEMPLATEEX
Definition: DlgPlate.h:141
LPDLGTEMPLATE AllocDlgTemplate(WORD Size)
Definition: DlgPlate.cpp:38
LPDLGITEMTEMPLATE AddDlgItem(LPDLGITEMTEMPLATE pBuf, DWORD Type, DWORD Style, DWORD ExStyle, short X, short Y, short W, short H, LPCWSTR Caption, WORD Id)
Definition: DlgPlate.cpp:94
void FreeExDlgTemplate(PDLGTEMPLATEEX pDlg)
Definition: DlgPlate.cpp:133
PDLGITEMTEMPLATEEX AddExDlgItem(PDLGITEMTEMPLATEEX pBuf, DWORD Type, DWORD Style, DWORD ExStyle, short X, short Y, short W, short H, LPCWSTR Caption, WORD Id, DWORD HelpId)
Definition: DlgPlate.cpp:206
DWORD style
Definition: DlgPlate.h:104
#define DEF_(x)
Definition: Common.h:240
Common include; Added types, small "ubiquitous" utilities, et c.
#define END_EXTERN_C
Definition: Common.h:221
#define BEGIN_EXTERN_C
Definition: Common.h:220
PDLGTEMPLATEEX AllocExDlgTemplate(WORD Size)
Definition: DlgPlate.cpp:128
PDLGITEMTEMPLATEEX SetExDlgStyle(PDLGTEMPLATEEX pBuf, DWORD Style, short X, short Y, short W, short H, LPCWSTR Caption, DWORD HelpId, WORD nCtls, LPCWSTR Font, short Points, short Weight=FW_NORMAL, BYTE CharSet=DEFAULT_CHARSET)
Definition: DlgPlate.cpp:146
unsigned char BYTE
Definition: Common.h:412