32#define CB_NOTIFY( lphc, code ) \
33 (SendMessageW((lphc)->owner, WM_COMMAND, \
34 MAKEWPARAM(GetWindowLongPtrW((lphc)->self,GWLP_ID), (code)), (LPARAM)(lphc)->self))
36#define CB_DISABLED( lphc ) (!IsWindowEnabled((lphc)->self))
37#define CB_OWNERDRAWN( lphc ) ((lphc)->dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE))
38#define CB_HASSTRINGS( lphc ) ((lphc)->dwStyle & CBS_HASSTRINGS)
39#define CB_HWND( lphc ) ((lphc)->self)
42#define CB_GETTYPE( lphc ) ((lphc)->dwStyle & (CBS_DROPDOWNLIST))
45#define ISWIN31 (LOWORD(GetVersion()) == 0x0a03)
57#define COMBO_YBORDERGAP 5
58#define COMBO_XBORDERSIZE() 2
59#define COMBO_YBORDERSIZE() 2
60#define COMBO_EDITBUTTONSPACE() 0
61#define EDIT_CONTROL_PADDING() 1
128 return prev_flags != lphc->
UIState;
145 COMBO_update_uistate(lphc);
165 TRACE(
"[%p], style = %08x\n", lphc, lphc->dwStyle );
178 TRACE(
"[%p]: freeing storage\n", lphc->
self);
223 baseUnitY =
tm.tmHeight;
230 iTextItemHeight = baseUnitY + 4;
242 INT originalItemHeight = iTextItemHeight;
250 lphc->
wState &= ~CBF_MEASUREITEM;
286 return iTextItemHeight;
455 static const WCHAR clbName[] = {
'C',
'o',
'm',
'b',
'o',
'L',
'B',
'o',
'x',0};
456 static const WCHAR editName[] = {
'E',
'd',
'i',
't',0};
531 lbeStyle &= ~WS_BORDER;
608 TRACE(
"init done\n");
611 ERR(
"edit control failure.\n");
612 }
else ERR(
"listbox failure.\n");
613 }
else ERR(
"no owner for visible combo.\n");
716 FIXME(
"LB_ERR probably not handled yet\n");
736 UINT itemState = ODS_COMBOBOXEDIT;
738 HBRUSH hPrevBrush, hBkgBrush;
805 !(lphc->
UIState & UISF_HIDEFOCUS))
866 HBRUSH hPrevBrush, hBkgBrush;
1032 if (nDroppedHeight <
r.bottom -
r.top)
1033 nDroppedHeight =
r.bottom -
r.top;
1043 nHeight = nIHeight*
nItems;
1050 r.top =
rect.bottom;
1052 r.bottom =
r.top + nDroppedHeight;
1056 mon_info.
cbSize =
sizeof(mon_info);
1086 TRACE(
"[%p]: sel ok? [%i] dropped? [%i]\n",
1098 lphc->
wState &= ~CBF_DROPPED;
1195 lphc->
wState &= ~CBF_FOCUSED;
1248 lphc->
wState &= ~CBF_NOLBSELECT;
1283 TRACE(
"[%p]: lbox selection change [%x]\n", lphc->
self, lphc->
wState );
1291 else lphc->
wState &= ~CBF_NOROLLUP;
1478 const RECT *rectEdit,
1489 rectEdit->
left, rectEdit->
top,
1504 lphc->
wState &= ~CBF_DROPPED;
1526 int newComboHeight, curComboHeight, curComboWidth;
1542 if( curComboHeight > newComboHeight )
1544 TRACE(
"oldComboHeight=%d, newComboHeight=%d, oldDropBottom=%d, oldDropTop=%d\n",
1552 if( curComboHeight != newComboHeight )
1683 lphc->
wState &= ~CBF_BUTTONDOWN;
1689 lphc->
wState &= ~CBF_CAPTURE;
1714 lphc->
wState &= ~CBF_CAPTURE;
1723 lphc->
wState &= ~CBF_NOLBSELECT;
1732 lphc->
wState &= ~CBF_BUTTONDOWN;
1759 lphc->
wState &= ~CBF_BUTTONDOWN;
1768 lphc->
wState &= ~CBF_CAPTURE;
1831 ERR(
"Wrong window class for ComboBox! fnId 0x%x\n",pWnd->
fnid);
1922 if (!hwndFocus || (hwndFocus != lphc->
hWndEdit && hwndFocus != lphc->
hWndLBox))
1937 if (
j == -1)
return 0;
1947 lphc->
wState &= ~CBF_NOEDITNOTIFY;
1977 lphc->
wState &= ~CBF_NOREDRAW;
2081 char *
string =
NULL;
2204 lphc->
wState &= ~CBF_SELCHANGE;
2230 else lphc->
wState &= ~CBF_EUI;
2242 case WM_UPDATEUISTATE:
2248 if (COMBO_update_uistate(lphc))
2308 TRACE(
"(%p, %p)\n", hwndCombo, pcbi);
ACPI_SIZE strlen(const char *String)
static const char * wine_dbgstr_rect(const RECT *prc)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
struct HEADCOMBO * LPHEADCOMBO
LRESULT WINAPI ComboWndProcA(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
LRESULT WINAPI ComboWndProcW(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
static LRESULT COMBO_Paint(HEADCOMBO *lphc, HDC hdc)
static LRESULT COMBO_NCDestroy(HEADCOMBO *lphc)
static void CBRepaintButton(LPHEADCOMBO lphc)
static void CBPaintBorder(const HEADCOMBO *lphc, HDC hdc)
#define COMBO_EDITBUTTONSPACE()
static INT CBGetTextAreaHeight(HEADCOMBO *lphc, BOOL clip_item_height)
static LRESULT COMBO_NCCreate(HWND hwnd, LONG style)
static BOOL COMBO_Init(void)
#define EDIT_CONTROL_PADDING()
static void COMBO_Size(HEADCOMBO *lphc)
static void COMBO_LButtonDown(LPHEADCOMBO lphc, LPARAM lParam)
static void COMBO_KillFocus(LPHEADCOMBO lphc)
static HBRUSH COMBO_PrepareColors(LPHEADCOMBO lphc, HDC hDC)
static INT CBUpdateLBox(LPHEADCOMBO lphc, BOOL bSelect)
static void COMBO_MouseMove(LPHEADCOMBO lphc, WPARAM wParam, LPARAM lParam)
static LRESULT COMBO_GetComboBoxInfo(const HEADCOMBO *lphc, COMBOBOXINFO *pcbi)
static void COMBO_SetFocus(LPHEADCOMBO lphc)
#define CB_OWNERDRAWN(lphc)
static void CBForceDummyResize(LPHEADCOMBO lphc)
static void CBPaintText(HEADCOMBO *lphc, HDC hdc_paint)
#define COMBO_YBORDERSIZE()
static LRESULT COMBO_Command(LPHEADCOMBO lphc, WPARAM wParam, HWND hWnd)
static void CBResetPos(HEADCOMBO *combo)
static void COMBO_LButtonUp(LPHEADCOMBO lphc)
static void CBCalcPlacement(HEADCOMBO *combo)
#define CB_HASSTRINGS(lphc)
static LRESULT COMBO_ItemOp(LPHEADCOMBO lphc, UINT msg, LPARAM lParam)
#define COMBO_XBORDERSIZE()
static LRESULT COMBO_SelectString(LPHEADCOMBO lphc, INT start, LPARAM pText)
static void CBRollUp(LPHEADCOMBO lphc, BOOL ok, BOOL bButton)
BOOL COMBO_FlipListbox(LPHEADCOMBO lphc, BOOL ok, BOOL bRedrawButton)
static LRESULT COMBO_SetItemHeight(LPHEADCOMBO lphc, INT index, INT height)
static void CBPaintButton(HEADCOMBO *lphc, HDC hdc)
static void CBDropDown(LPHEADCOMBO lphc)
static void COMBO_Font(LPHEADCOMBO lphc, HFONT hFont, BOOL bRedraw)
#define CB_DISABLED(lphc)
#define CB_NOTIFY(lphc, code)
static void CBGetDroppedControlRect(LPHEADCOMBO lphc, LPRECT lpRect)
static LRESULT COMBO_Create(HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG style)
static void CBUpdateEdit(LPHEADCOMBO lphc, INT index)
#define HeapFree(x, y, z)
#define ValidateHwnd(hwnd)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define WNDS2_WIN40COMPAT
BOOL NTAPI NtUserGetComboBoxInfo(HWND hWnd, PCOMBOBOXINFO pcbi)
BOOL NTAPI NtUserInvalidateRect(HWND hWnd, CONST RECT *lpRect, BOOL bErase)
BOOL NTAPI NtUserSetWindowFNID(HWND hWnd, WORD fnID)
#define memcpy(s1, s2, n)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
HMONITOR WINAPI MonitorFromRect(LPCRECT, DWORD)
#define LBS_DISABLENOSCROLL
#define WS_EX_NOPARENTNOTIFY
#define LBS_NOINTEGRALHEIGHT
#define WM_CBLOSTTEXTFOCUS
const char * SPY_GetMsgName(UINT msg, HWND hWnd)
#define WIN_GetFullHandle(h)
HBRUSH FASTCALL GetControlColor(PWND pwndParent, PWND pwnd, HDC hdc, UINT CtlMsg)
static LRESULT COMBO_GetTextW(LPHEADCOMBO lphc, INT count, LPWSTR buf)
LRESULT WINAPI ComboWndProc_common(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, BOOL unicode)
static const WCHAR comboboxW[]
const struct builtin_class_descr COMBO_builtin_class
static char * strdupA(LPCSTR str)
static LRESULT COMBO_GetTextA(LPHEADCOMBO lphc, INT count, LPSTR buf)
static const WCHAR empty_stringW[]
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN)
#define CBS_OWNERDRAWFIXED
HWND WINAPI SetCapture(_In_ HWND hWnd)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
DWORD WINAPI GetSysColor(_In_ int)
#define STATE_SYSTEM_PRESSED
BOOL WINAPI CopyRect(_Out_ LPRECT, _In_ LPCRECT)
BOOL WINAPI IsWindow(_In_opt_ HWND)
int WINAPI FrameRect(_In_ HDC, _In_ LPCRECT, _In_ HBRUSH)
#define WM_CTLCOLORSTATIC
#define CB_GETHORIZONTALEXTENT
#define CB_SETDROPPEDWIDTH
#define LB_FINDSTRINGEXACT
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
#define GetWindowLongPtrW
#define LB_SETHORIZONTALEXTENT
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI ReleaseCapture(void)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CBS_NOINTEGRALHEIGHT
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI InvertRect(_In_ HDC, _In_ LPCRECT)
BOOL WINAPI DrawFrameControl(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define CB_SETHORIZONTALEXTENT
#define CBS_OWNERDRAWVARIABLE
HWND WINAPI SetParent(_In_ HWND, _In_opt_ HWND)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define CBS_DISABLENOSCROLL
struct tagCREATESTRUCTA * LPCREATESTRUCTA
LPWSTR WINAPI CharLowerW(_Inout_ LPWSTR)
LPSTR WINAPI CharLowerA(_Inout_ LPSTR)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
HWND WINAPI GetCapture(void)
#define WM_CTLCOLORSCROLLBAR
LPSTR WINAPI CharUpperA(_Inout_ LPSTR)
#define CB_FINDSTRINGEXACT
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define CB_GETDROPPEDWIDTH
#define CB_GETCOMBOBOXINFO
#define WM_CTLCOLORMSGBOX
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define CB_GETDROPPEDCONTROLRECT
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI GetComboBoxInfo(_In_ HWND, _Inout_ PCOMBOBOXINFO)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define LB_GETHORIZONTALEXTENT
#define STATE_SYSTEM_INVISIBLE
BOOL WINAPI UpdateWindow(_In_ HWND)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define COLOR_HIGHLIGHTTEXT
HDC WINAPI GetDC(_In_opt_ HWND)
#define DFCS_SCROLLCOMBOBOX
#define CB_GETDROPPEDSTATE
BOOL WINAPI IsWindowEnabled(_In_ HWND)
#define WM_CTLCOLORLISTBOX
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
BOOL WINAPI DrawFocusRect(_In_ HDC, _In_ LPCRECT)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
HBITMAP WINAPI LoadBitmapW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI UnionRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
#define SetWindowLongPtrW
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
struct tagCREATESTRUCTW * LPCREATESTRUCTW
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
LPWSTR WINAPI CharUpperW(_Inout_ LPWSTR)