2 * User controls definitions
4 * Copyright 2000 Alexandre Julliard
7 #ifndef __WINE_CONTROLS_H
8 #define __WINE_CONTROLS_H
13 /* Built-in class names (see _Undocumented_Windows_ p.418) */
14 #define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */
15 #define DESKTOP_CLASS_ATOM MAKEINTATOM(32769) /* Desktop */
16 #define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
17 #define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
18 #define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
20 /* Built-in class descriptor */
21 struct builtin_class_descr
23 LPCSTR name
; /* class name */
24 UINT style
; /* class style */
25 WNDPROC procA
; /* ASCII window procedure */
26 WNDPROC procW
; /* Unicode window procedure */
27 INT extra
; /* window extra bytes */
28 LPCSTR cursor
; /* cursor name */
29 HBRUSH brush
; /* brush or system color */
34 extern BOOL
DESKTOP_SetPattern( LPCSTR pattern
);
37 extern HWND
ICONTITLE_Create( HWND hwnd
);
40 extern BOOL
MENU_Init(void);
41 extern BOOL
MENU_IsMenuActive(void);
42 extern HMENU
MENU_GetSysMenu(HWND hWndOwner
, HMENU hSysPopup
);
43 extern UINT
MENU_GetMenuBarHeight( HWND hwnd
, UINT menubarWidth
,
45 extern void MENU_TrackMouseMenuBar( HWND hwnd
, INT ht
, POINT pt
);
46 extern void MENU_TrackKbdMenuBar( HWND hwnd
, UINT wParam
, INT vkey
);
47 extern UINT
MENU_DrawMenuBar( HDC hDC
, LPRECT lprect
,
48 HWND hwnd
, BOOL suppress_draw
);
49 extern UINT
MENU_FindSubMenu( HMENU
*hmenu
, HMENU hSubTarget
);
52 extern void SCROLL_DrawScrollBar( HWND hwnd
, HDC hdc
, INT nBar
, BOOL arrows
, BOOL interior
);
53 extern void SCROLL_HandleScrollEvent( HWND hwnd
, INT nBar
, UINT msg
, POINT pt
);
54 extern INT
SCROLL_SetNCSbState( HWND hwnd
, int vMin
, int vMax
, int vPos
,
55 int hMin
, int hMax
, int hPos
);
59 #define ID_CB_LISTBOX 1000
60 #define ID_CB_EDIT 1001
63 #define CBF_DROPPED 0x0001
64 #define CBF_BUTTONDOWN 0x0002
65 #define CBF_NOROLLUP 0x0004
66 #define CBF_MEASUREITEM 0x0008
67 #define CBF_FOCUSED 0x0010
68 #define CBF_CAPTURE 0x0020
69 #define CBF_EDIT 0x0040
70 #define CBF_NORESIZE 0x0080
71 #define CBF_NOTIFY 0x0100
72 #define CBF_NOREDRAW 0x0200
73 #define CBF_SELCHANGE 0x0400
74 #define CBF_NOEDITNOTIFY 0x1000
75 #define CBF_NOLBSELECT 0x2000 /* do not change current selection */
76 #define CBF_EUI 0x8000
78 /* combo state struct */
92 INT fixedOwnerDrawHeight
;
93 INT droppedWidth
; /* last two are not used unless set */
94 INT editHeight
; /* explicitly */
95 } HEADCOMBO
,*LPHEADCOMBO
;
97 /* Note, that CBS_DROPDOWNLIST style is actually (CBS_SIMPLE | CBS_DROPDOWN) */
98 #define CB_GETTYPE( lphc ) ((lphc)->dwStyle & (CBS_DROPDOWNLIST))
100 extern BOOL
COMBO_FlipListbox( LPHEADCOMBO
, BOOL
, BOOL
);
102 /* Dialog info structure.
103 * This structure is stored into the window extra bytes (cbWndExtra).
104 * sizeof(DIALOGINFO) must be <= DLGWINDOWEXTRA (=30).
106 #include "pshpack1.h"
110 INT msgResult
; /* 00 Last message result */
111 HWINDOWPROC dlgProc
; /* 04 Dialog procedure */
112 LONG userInfo
; /* 08 User information (for DWL_USER) */
114 /* implementation-dependent part */
116 HWND16 hwndFocus
; /* 0c Current control with focus */
117 HFONT16 hUserFont
; /* 0e Dialog font */
118 HMENU16 hMenu
; /* 10 Dialog menu */
119 WORD xBaseUnit
; /* 12 Dialog units (depends on the font) */
120 WORD yBaseUnit
; /* 14 */
121 INT idResult
; /* 16 EndDialog() result / default pushbutton ID */
122 UINT16 flags
; /* 1a EndDialog() called for this dialog */
123 HGLOBAL16 hDialogHeap
; /* 1c */
128 #define DF_END 0x0001
129 #define DF_OWNERENABLED 0x0002
131 extern BOOL
DIALOG_Init(void);
133 #endif /* __WINE_CONTROLS_H */