Release 950727
[wine] / include / dialog.h
1 /*
2  * Dialog definitions
3  *
4  * Copyright 1993 Alexandre Julliard
5  */
6
7 #ifndef DIALOG_H
8 #define DIALOG_H
9
10 #include "windows.h"
11
12 extern BOOL DIALOG_Init(void);
13 extern HWND DIALOG_GetFirstTabItem( HWND hwndDlg );
14 extern int DialogBoxIndirectPtr(HINSTANCE hInst, LPCSTR dlgTemplate,
15                                 HWND owner, WNDPROC dlgProc);
16 extern int DialogBoxIndirectParamPtr(HINSTANCE hInst, LPCSTR dlgTemplate,
17                                      HWND owner, WNDPROC dlgProc, 
18                                      LPARAM param);
19
20 #ifndef WINELIB
21 #pragma pack(1)
22 #endif
23
24   /* Dialog info structure.
25    * This structure is stored into the window extra bytes (cbWndExtra).
26    * sizeof(DIALOGINFO) must be <= DLGWINDOWEXTRA (=30).
27    */
28 typedef struct
29 {
30     LONG      msgResult;   /* Result of EndDialog() / Default button id */
31     WNDPROC   dlgProc;     /* Dialog procedure */
32     LONG      userInfo;    /* User information (for DWL_USER) */
33     HWND      hwndFocus;   /* Current control with focus */
34     HFONT     hUserFont;   /* Dialog font */
35     HMENU     hMenu;       /* Dialog menu */
36     WORD      xBaseUnit;   /* Dialog units (depends on the font) */
37     WORD      yBaseUnit;
38     WORD      fEnd;        /* EndDialog() called for this dialog */
39     HANDLE    hDialogHeap;
40 } DIALOGINFO;
41
42
43   /* Dialog template header */
44 typedef struct
45 {
46     DWORD     style;    
47     BYTE      nbItems WINE_PACKED;
48     WORD      x WINE_PACKED;
49     WORD      y WINE_PACKED;
50     WORD      cx WINE_PACKED;
51     WORD      cy WINE_PACKED;
52 } DLGTEMPLATEHEADER;
53
54
55   /* Dialog control header */
56 typedef struct
57 {
58     WORD       x;
59     WORD       y;
60     WORD       cx;
61     WORD       cy;
62     WORD       id;
63     DWORD      style WINE_PACKED;
64 } DLGCONTROLHEADER;
65
66
67   /* Dialog template */
68 typedef struct
69 {
70     DLGTEMPLATEHEADER * header;
71     unsigned char *     menuName;
72     LPSTR               className;
73     LPSTR               caption;
74     WORD                pointSize;
75     LPSTR               faceName;
76 } DLGTEMPLATE;
77
78 #ifndef WINELIB
79 #pragma pack(4)
80 #endif
81
82 #endif  /* DIALOG_H */