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 MAKEINTATOMA(32768) /* PopupMenu */
15 #define DESKTOP_CLASS_ATOM MAKEINTATOMA(32769) /* Desktop */
16 #define DIALOG_CLASS_ATOM MAKEINTATOMA(32770) /* Dialog */
17 #define WINSWITCH_CLASS_ATOM MAKEINTATOMA(32771) /* WinSwitch */
18 #define ICONTITLE_CLASS_ATOM MAKEINTATOMA(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_TrackScrollBar( HWND hwnd
, INT scrollbar
, 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 */
105 HWND hwndFocus
; /* Current control with focus */
106 HFONT hUserFont
; /* Dialog font */
107 HMENU hMenu
; /* Dialog menu */
108 UINT xBaseUnit
; /* Dialog units (depends on the font) */
110 INT idResult
; /* EndDialog() result / default pushbutton ID */
111 UINT flags
; /* EndDialog() called for this dialog */
112 HGLOBAL16 hDialogHeap
;
115 #define DF_END 0x0001
116 #define DF_OWNERENABLED 0x0002
118 /* offset of DIALOGINFO ptr in dialog extra bytes */
119 #define DWL_WINE_DIALOGINFO (DWL_USER+sizeof(ULONG_PTR))
121 inline static DIALOGINFO
*DIALOG_get_info( HWND hwnd
)
123 return (DIALOGINFO
*)GetWindowLongW( hwnd
, DWL_WINE_DIALOGINFO
);
126 extern BOOL
DIALOG_Init(void);
128 #endif /* __WINE_CONTROLS_H */