Alexandre Julliard | 0e60778 | 1993-11-03 19:23:37 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Combo box definitions |
| 3 | */ |
| 4 | |
Alexandre Julliard | df2673b | 1997-03-29 17:20:20 +0000 | [diff] [blame] | 5 | #ifndef __WINE_COMBO_H |
| 6 | #define __WINE_COMBO_H |
Alexandre Julliard | 0e60778 | 1993-11-03 19:23:37 +0000 | [diff] [blame] | 7 | |
Patrik Stridvall | 1ed4ecf | 1999-06-26 14:58:24 +0000 | [diff] [blame] | 8 | #include "windef.h" |
| 9 | |
| 10 | struct tagWND; |
| 11 | |
Alexandre Julliard | df2673b | 1997-03-29 17:20:20 +0000 | [diff] [blame] | 12 | #define ID_CB_LISTBOX 1000 |
| 13 | #define ID_CB_EDIT 1001 |
| 14 | |
| 15 | /* Internal flags */ |
| 16 | |
| 17 | #define CBF_DROPPED 0x0001 |
| 18 | #define CBF_BUTTONDOWN 0x0002 |
| 19 | #define CBF_NOROLLUP 0x0004 |
| 20 | #define CBF_MEASUREITEM 0x0008 |
| 21 | #define CBF_FOCUSED 0x0010 |
| 22 | #define CBF_CAPTURE 0x0020 |
| 23 | #define CBF_EDIT 0x0040 |
| 24 | #define CBF_NORESIZE 0x0080 |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 25 | #define CBF_NOTIFY 0x0100 |
Alexandre Julliard | e658d82 | 1997-11-30 17:45:40 +0000 | [diff] [blame] | 26 | #define CBF_NOREDRAW 0x0200 |
Alex Korobka | 311d329 | 1999-01-01 18:40:02 +0000 | [diff] [blame] | 27 | #define CBF_SELCHANGE 0x0400 |
Francis Beaudet | 6ec3eaf | 1999-06-12 10:51:19 +0000 | [diff] [blame] | 28 | #define CBF_NOEDITNOTIFY 0x1000 |
Alexandre Julliard | df2673b | 1997-03-29 17:20:20 +0000 | [diff] [blame] | 29 | #define CBF_EUI 0x8000 |
| 30 | |
| 31 | /* Combo state struct */ |
| 32 | |
| 33 | typedef struct |
| 34 | { |
Patrik Stridvall | 1ed4ecf | 1999-06-26 14:58:24 +0000 | [diff] [blame] | 35 | struct tagWND *self; |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 36 | HWND owner; |
| 37 | UINT dwStyle; |
| 38 | HWND hWndEdit; |
| 39 | HWND hWndLBox; |
| 40 | UINT wState; |
| 41 | HFONT hFont; |
Francis Beaudet | f585c61 | 1999-04-02 10:37:42 +0000 | [diff] [blame] | 42 | RECT textRect; |
| 43 | RECT buttonRect; |
| 44 | RECT droppedRect; |
Francis Beaudet | 6ec3eaf | 1999-06-12 10:51:19 +0000 | [diff] [blame] | 45 | INT droppedIndex; |
Francis Beaudet | f585c61 | 1999-04-02 10:37:42 +0000 | [diff] [blame] | 46 | INT fixedOwnerDrawHeight; |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 47 | INT droppedWidth; /* last two are not used unless set */ |
| 48 | INT editHeight; /* explicitly */ |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 49 | } HEADCOMBO,*LPHEADCOMBO; |
Alexandre Julliard | af0bae5 | 1995-10-03 17:06:08 +0000 | [diff] [blame] | 50 | |
Alexandre Julliard | df2673b | 1997-03-29 17:20:20 +0000 | [diff] [blame] | 51 | /* |
| 52 | * Note, that CBS_DROPDOWNLIST style is actually (CBS_SIMPLE | CBS_DROPDOWN)! |
| 53 | */ |
| 54 | |
| 55 | #define CB_GETTYPE( lphc ) ((lphc)->dwStyle & (CBS_DROPDOWNLIST)) |
| 56 | #define CB_DISABLED( lphc ) ((lphc)->self->dwStyle & WS_DISABLED) |
| 57 | #define CB_OWNERDRAWN( lphc ) ((lphc)->dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE)) |
| 58 | #define CB_HASSTRINGS( lphc ) ((lphc)->dwStyle & CBS_HASSTRINGS) |
| 59 | #define CB_HWND( lphc ) ((lphc)->self->hwndSelf) |
| 60 | |
Patrik Stridvall | 1ed4ecf | 1999-06-26 14:58:24 +0000 | [diff] [blame] | 61 | LRESULT WINAPI ComboWndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); |
| 62 | |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 63 | BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL ); |
Patrik Stridvall | 1ed4ecf | 1999-06-26 14:58:24 +0000 | [diff] [blame] | 64 | HWND COMBO_GetLBWindow( struct tagWND * ); |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 65 | LRESULT COMBO_Directory( LPHEADCOMBO, UINT, LPSTR, BOOL ); |
Alexandre Julliard | df2673b | 1997-03-29 17:20:20 +0000 | [diff] [blame] | 66 | |
| 67 | #endif /* __WINE_COMBO_H */ |
| 68 | |