14 PVOID AlignPtr( PVOID Ptr,
WORD Chunk )
16 --Chunk;
return PVOID( DWORD_PTR(
PBYTE(Ptr)+Chunk ) & ~DWORD_PTR( Chunk ));
20 return (
PBYTE) (DWORD_PTR(Ptr+3) & ~DWORD_PTR(3));
24 return (
PBYTE)(DWORD_PTR(Ptr+1) & ~DWORD_PTR(1));
26 DWORD_PTR
dwPad( DWORD_PTR X )
28 return (DWORD_PTR(X+3) & ~DWORD_PTR(3));
36 static const LPCWSTR S_ShellFont = L
"MS Shell Dlg";
41 HGLOBAL hMem = GlobalAlloc( GHND, Size );
42 return hMem ? (LPDLGTEMPLATE) GlobalLock( hMem ) : NULL;
46 GlobalFree( (HGLOBAL) pDlg );
49 typedef union _ditUniPtr {
68 if (DWORD_PTR( pDlg ) & DWORD_PTR( 3 )) {
69 SetLastError( ERROR_INVALID_PARAMETER );
73 pDlg->dwExtendedStyle = 0;
85 if (Style & DS_SETFONT)
87 if HAVE_BITS( Style, DS_SHELLFONT ) Font = S_ShellFont;
95 LPDLGITEMTEMPLATE pBuf,
108 u.
pItem->style = Style;
109 u.
pItem->dwExtendedStyle = ExStyle;
130 HGLOBAL hMem = GlobalAlloc( GHND, Size );
135 GlobalFree( (HGLOBAL) pDlg );
138 typedef union _ditxUniPtr {
160 if (DWORD_PTR( pDlg ) & DWORD_PTR( 3 )) {
161 SetLastError( ERROR_INVALID_PARAMETER );
194 if (Style & DS_SETFONT)
196 if HAVE_BITS( Style, DS_SHELLFONT ) Font = S_ShellFont;
200 *u.
pByte++ = CharSet;
#define HAVE_BITS(var, mask)
void FreeDlgTemplate(LPDLGTEMPLATE pDlg)
LPDLGITEMTEMPLATE SetDlgStyle(LPDLGTEMPLATE pDlg, DWORD Style, short X, short Y, short W, short H, LPCWSTR Caption, WORD nCtls, LPCWSTR Font, WORD Points)
DLGTEMPLATEEX * PDLGTEMPLATEEX
LPDLGTEMPLATE AllocDlgTemplate(WORD Size)
LPDLGITEMTEMPLATE AddDlgItem(LPDLGITEMTEMPLATE pBuf, DWORD Type, DWORD Style, DWORD ExStyle, short X, short Y, short W, short H, LPCWSTR Caption, WORD Id)
void FreeExDlgTemplate(PDLGTEMPLATEEX pDlg)
DWORD_PTR dwPad(DWORD_PTR X)
PDLGITEMTEMPLATEEX AddExDlgItem(PDLGITEMTEMPLATEEX pBuf, DWORD Type, DWORD Style, DWORD ExStyle, short X, short Y, short W, short H, LPCWSTR Caption, WORD Id, DWORD HelpId)
wchar_t *__fastcall wcsecpy(register wchar_t *Dst, register const wchar_t *Src)
PDLGTEMPLATEEX AllocExDlgTemplate(WORD Size)
PDLGITEMTEMPLATEEX SetExDlgStyle(PDLGTEMPLATEEX pDlg, DWORD Style, short X, short Y, short W, short H, LPCWSTR Caption, DWORD HelpId, WORD nCtls, LPCWSTR Font, short Points, short Weight, BYTE CharSet)