Commit 63984489 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/comboex: Move debugging traces that require additional code into TRACE_ON() condition.

parent 253edf0f
...@@ -544,7 +544,7 @@ static BOOL COMBOEX_GetItemW (const COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW *cit) ...@@ -544,7 +544,7 @@ static BOOL COMBOEX_GetItemW (const COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW *cit)
INT_PTR index = cit->iItem; INT_PTR index = cit->iItem;
CBE_ITEMDATA *item; CBE_ITEMDATA *item;
TRACE("(...)\n"); TRACE("\n");
/* if item number requested does not exist then return failure */ /* if item number requested does not exist then return failure */
if ((index >= infoPtr->nb_items) || (index < -1)) return FALSE; if ((index >= infoPtr->nb_items) || (index < -1)) return FALSE;
...@@ -564,7 +564,7 @@ static BOOL COMBOEX_GetItemA (const COMBOEX_INFO *infoPtr, COMBOBOXEXITEMA *cit) ...@@ -564,7 +564,7 @@ static BOOL COMBOEX_GetItemA (const COMBOEX_INFO *infoPtr, COMBOBOXEXITEMA *cit)
{ {
COMBOBOXEXITEMW tmpcit; COMBOBOXEXITEMW tmpcit;
TRACE("(...)\n"); TRACE("\n");
tmpcit.mask = cit->mask; tmpcit.mask = cit->mask;
tmpcit.iItem = cit->iItem; tmpcit.iItem = cit->iItem;
...@@ -747,7 +747,7 @@ static HIMAGELIST COMBOEX_SetImageList (COMBOEX_INFO *infoPtr, HIMAGELIST himl) ...@@ -747,7 +747,7 @@ static HIMAGELIST COMBOEX_SetImageList (COMBOEX_INFO *infoPtr, HIMAGELIST himl)
{ {
HIMAGELIST himlTemp = infoPtr->himl; HIMAGELIST himlTemp = infoPtr->himl;
TRACE("(...)\n"); TRACE("\n");
infoPtr->himl = himl; infoPtr->himl = himl;
...@@ -967,7 +967,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs) ...@@ -967,7 +967,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs)
static const WCHAR NIL[] = { 0 }; static const WCHAR NIL[] = { 0 };
COMBOEX_INFO *infoPtr; COMBOEX_INFO *infoPtr;
LOGFONTW mylogfont; LOGFONTW mylogfont;
RECT wnrc1, clrc1, cmbwrc; RECT win_rect;
INT i; INT i;
/* allocate memory for info structure */ /* allocate memory for info structure */
...@@ -992,11 +992,13 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs) ...@@ -992,11 +992,13 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs)
SetWindowLongPtrW (hwnd, 0, (DWORD_PTR)infoPtr); SetWindowLongPtrW (hwnd, 0, (DWORD_PTR)infoPtr);
/* create combo box */ if (TRACE_ON(comboex)) {
GetWindowRect(hwnd, &wnrc1); RECT client, rect;
GetClientRect(hwnd, &clrc1); GetWindowRect(hwnd, &rect);
TRACE("EX window=(%s), client=(%s)\n", GetClientRect(hwnd, &client);
wine_dbgstr_rect(&wnrc1), wine_dbgstr_rect(&clrc1)); TRACE("EX window=(%s), client=(%s)\n",
wine_dbgstr_rect(&rect), wine_dbgstr_rect(&client));
}
/* Native version of ComboEx creates the ComboBox with DROPDOWNLIST */ /* Native version of ComboEx creates the ComboBox with DROPDOWNLIST */
/* specified. It then creates it's own version of the EDIT control */ /* specified. It then creates it's own version of the EDIT control */
...@@ -1071,20 +1073,24 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs) ...@@ -1071,20 +1073,24 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs)
/* Above is fairly certain, below is much less certain. */ /* Above is fairly certain, below is much less certain. */
GetWindowRect(hwnd, &wnrc1); GetWindowRect(hwnd, &win_rect);
GetClientRect(hwnd, &clrc1);
GetWindowRect(infoPtr->hwndCombo, &cmbwrc); if (TRACE_ON(comboex)) {
TRACE("EX window=(%s) client=(%s) CB wnd=(%s)\n", RECT client, rect;
wine_dbgstr_rect(&wnrc1), wine_dbgstr_rect(&clrc1), GetClientRect(hwnd, &client);
wine_dbgstr_rect(&cmbwrc)); GetWindowRect(infoPtr->hwndCombo, &rect);
SetWindowPos(infoPtr->hwndCombo, HWND_TOP, TRACE("EX window=(%s) client=(%s) CB wnd=(%s)\n",
0, 0, wnrc1.right-wnrc1.left, wnrc1.bottom-wnrc1.top, wine_dbgstr_rect(&win_rect), wine_dbgstr_rect(&client),
wine_dbgstr_rect(&rect));
}
SetWindowPos(infoPtr->hwndCombo, HWND_TOP, 0, 0,
win_rect.right - win_rect.left, win_rect.bottom - win_rect.top,
SWP_NOACTIVATE | SWP_NOREDRAW); SWP_NOACTIVATE | SWP_NOREDRAW);
GetWindowRect(infoPtr->hwndCombo, &cmbwrc); GetWindowRect(infoPtr->hwndCombo, &win_rect);
TRACE("CB window=(%s)\n", wine_dbgstr_rect(&cmbwrc)); TRACE("CB window=(%s)\n", wine_dbgstr_rect(&win_rect));
SetWindowPos(hwnd, HWND_TOP, SetWindowPos(hwnd, HWND_TOP, 0, 0,
0, 0, cmbwrc.right-cmbwrc.left, cmbwrc.bottom-cmbwrc.top, win_rect.right - win_rect.left, win_rect.bottom - win_rect.top,
SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE); SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE);
COMBOEX_AdjustEditPos (infoPtr); COMBOEX_AdjustEditPos (infoPtr);
...@@ -1357,12 +1363,11 @@ static LRESULT COMBOEX_DrawItem (const COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT con ...@@ -1357,12 +1363,11 @@ static LRESULT COMBOEX_DrawItem (const COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT con
(dis->itemAction == ODA_DRAWENTIRE)) { (dis->itemAction == ODA_DRAWENTIRE)) {
/* draw of edit control data */ /* draw of edit control data */
/* testing */ if (TRACE_ON(comboex)) {
{
RECT exrc, cbrc, edrc; RECT exrc, cbrc, edrc;
GetWindowRect (infoPtr->hwndSelf, &exrc); GetWindowRect (infoPtr->hwndSelf, &exrc);
GetWindowRect (infoPtr->hwndCombo, &cbrc); GetWindowRect (infoPtr->hwndCombo, &cbrc);
edrc.left=edrc.top=edrc.right=edrc.bottom=-1; edrc.left = edrc.top = edrc.right = edrc.bottom = -1;
if (infoPtr->hwndEdit) GetWindowRect (infoPtr->hwndEdit, &edrc); if (infoPtr->hwndEdit) GetWindowRect (infoPtr->hwndEdit, &edrc);
TRACE("window rects ex=(%s), cb=(%s), ed=(%s)\n", TRACE("window rects ex=(%s), cb=(%s), ed=(%s)\n",
wine_dbgstr_rect(&exrc), wine_dbgstr_rect(&cbrc), wine_dbgstr_rect(&exrc), wine_dbgstr_rect(&cbrc),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment