make background colour apply to choice/combobox dropdown listbox as well as the main part (patch 1023669)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -269,6 +269,7 @@ wxMSW:
|
|||||||
- fixed wxTextCtrl::SetMaxLength for rich edit controls
|
- fixed wxTextCtrl::SetMaxLength for rich edit controls
|
||||||
- fixed flat style for toolbars under XP, Windows Classic style
|
- fixed flat style for toolbars under XP, Windows Classic style
|
||||||
- fixed truncation of transferred data in wxConnection under unicode build
|
- fixed truncation of transferred data in wxConnection under unicode build
|
||||||
|
- wxChoice and wxComboBox dropdown background can be set now too (Adrian Lupei)
|
||||||
|
|
||||||
wxUniv/X11:
|
wxUniv/X11:
|
||||||
|
|
||||||
|
@@ -539,18 +539,37 @@ wxSize wxChoice::DoGetBestSize() const
|
|||||||
|
|
||||||
WXLRESULT wxChoice::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
WXLRESULT wxChoice::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||||
{
|
{
|
||||||
if ( nMsg == WM_LBUTTONUP )
|
switch ( nMsg )
|
||||||
{
|
{
|
||||||
int x = (int)LOWORD(lParam);
|
case WM_LBUTTONUP:
|
||||||
int y = (int)HIWORD(lParam);
|
{
|
||||||
|
int x = (int)LOWORD(lParam);
|
||||||
|
int y = (int)HIWORD(lParam);
|
||||||
|
|
||||||
// Ok, this is truly weird, but if a panel with a wxChoice loses the
|
// Ok, this is truly weird, but if a panel with a wxChoice
|
||||||
// focus, then you get a *fake* WM_LBUTTONUP message with x = 65535 and
|
// loses the focus, then you get a *fake* WM_LBUTTONUP message
|
||||||
// y = 65535. Filter out this nonsense.
|
// with x = 65535 and y = 65535. Filter out this nonsense.
|
||||||
//
|
//
|
||||||
// VZ: I'd like to know how to reproduce this please...
|
// VZ: I'd like to know how to reproduce this please...
|
||||||
if ( x == 65535 && y == 65535 )
|
if ( x == 65535 && y == 65535 )
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
// we have to handle both: one for the normal case and the other
|
||||||
|
// for readonly
|
||||||
|
case WM_CTLCOLOREDIT:
|
||||||
|
case WM_CTLCOLORLISTBOX:
|
||||||
|
case WM_CTLCOLORSTATIC:
|
||||||
|
{
|
||||||
|
WXWORD nCtlColor;
|
||||||
|
WXHDC hdc;
|
||||||
|
WXHWND hwnd;
|
||||||
|
UnpackCtlColor(wParam, lParam, &nCtlColor, &hdc, &hwnd);
|
||||||
|
|
||||||
|
return (WXLRESULT)OnCtlColor(hdc, hwnd, nCtlColor,
|
||||||
|
nMsg, wParam, lParam);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return wxWindow::MSWWindowProc(nMsg, wParam, lParam);
|
return wxWindow::MSWWindowProc(nMsg, wParam, lParam);
|
||||||
|
Reference in New Issue
Block a user