mirror of
https://github.com/reactos/wine.git
synced 2024-11-30 07:00:30 +00:00
9926d33450
other than CBS_SIMPLE, parent of listbox is set to desktop. - In CBDropDown. ComboBox uses only first item to calculate height of dropped listbox. Also if listbox is empty its height is unmodified (previously it was set to 0). - Added correct handling of WM_GETDLGCODE and WM_(SYS)KEYDOWN messages. - General clean-up. Message order is now more precise (at least notifications to client); listbox - combobox interaction has slight differences comparing to Windows.
69 lines
1.8 KiB
C
69 lines
1.8 KiB
C
/*
|
|
* Combo box definitions
|
|
*/
|
|
|
|
#ifndef __WINE_COMBO_H
|
|
#define __WINE_COMBO_H
|
|
|
|
#include "windef.h"
|
|
|
|
struct tagWND;
|
|
|
|
#define ID_CB_LISTBOX 1000
|
|
#define ID_CB_EDIT 1001
|
|
|
|
/* Internal flags */
|
|
|
|
#define CBF_DROPPED 0x0001
|
|
#define CBF_BUTTONDOWN 0x0002
|
|
#define CBF_NOROLLUP 0x0004
|
|
#define CBF_MEASUREITEM 0x0008
|
|
#define CBF_FOCUSED 0x0010
|
|
#define CBF_CAPTURE 0x0020
|
|
#define CBF_EDIT 0x0040
|
|
#define CBF_NORESIZE 0x0080
|
|
#define CBF_NOTIFY 0x0100
|
|
#define CBF_NOREDRAW 0x0200
|
|
#define CBF_SELCHANGE 0x0400
|
|
#define CBF_NOEDITNOTIFY 0x1000
|
|
#define CBF_NOLBSELECT 0x2000 /* do not change current selection */
|
|
#define CBF_EUI 0x8000
|
|
|
|
/* Combo state struct */
|
|
|
|
typedef struct
|
|
{
|
|
struct tagWND *self;
|
|
HWND owner;
|
|
UINT dwStyle;
|
|
HWND hWndEdit;
|
|
HWND hWndLBox;
|
|
UINT wState;
|
|
HFONT hFont;
|
|
RECT textRect;
|
|
RECT buttonRect;
|
|
RECT droppedRect;
|
|
INT droppedIndex;
|
|
INT fixedOwnerDrawHeight;
|
|
INT droppedWidth; /* last two are not used unless set */
|
|
INT editHeight; /* explicitly */
|
|
} HEADCOMBO,*LPHEADCOMBO;
|
|
|
|
/*
|
|
* Note, that CBS_DROPDOWNLIST style is actually (CBS_SIMPLE | CBS_DROPDOWN)!
|
|
*/
|
|
|
|
#define CB_GETTYPE( lphc ) ((lphc)->dwStyle & (CBS_DROPDOWNLIST))
|
|
#define CB_DISABLED( lphc ) ((lphc)->self->dwStyle & WS_DISABLED)
|
|
#define CB_OWNERDRAWN( lphc ) ((lphc)->dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE))
|
|
#define CB_HASSTRINGS( lphc ) ((lphc)->dwStyle & CBS_HASSTRINGS)
|
|
#define CB_HWND( lphc ) ((lphc)->self->hwndSelf)
|
|
|
|
LRESULT WINAPI ComboWndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
|
|
|
BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL );
|
|
LRESULT COMBO_Directory( LPHEADCOMBO, UINT, LPSTR, BOOL );
|
|
|
|
#endif /* __WINE_COMBO_H */
|
|
|