background colour of a combobox may now be set (bug 805442)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -154,6 +154,7 @@ wxMSW:
|
|||||||
- experimental wxURL implementation using WinInet functions (Hajo Kirchhoff)
|
- experimental wxURL implementation using WinInet functions (Hajo Kirchhoff)
|
||||||
- fixed several bugs in wxNotebook with wxNB_MULTILINE style
|
- fixed several bugs in wxNotebook with wxNB_MULTILINE style
|
||||||
- accelerators are now initially hidden if appropriate (Peter Nielsen)
|
- accelerators are now initially hidden if appropriate (Peter Nielsen)
|
||||||
|
- background colour of a wxComboBox may now be set
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
|
@@ -95,6 +95,8 @@ public:
|
|||||||
// implementation only from now on
|
// implementation only from now on
|
||||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||||
bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
|
bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
|
||||||
|
@@ -213,11 +213,12 @@ LRESULT APIENTRY _EXPORT wxComboEditWndProc(HWND hWnd,
|
|||||||
return ::CallWindowProc(CASTWNDPROC gs_wndprocEdit, hWnd, message, wParam, lParam);
|
return ::CallWindowProc(CASTWNDPROC gs_wndprocEdit, hWnd, message, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHBRUSH wxComboBox::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
WXHBRUSH wxComboBox::OnCtlColor(WXHDC pDC,
|
||||||
WXUINT WXUNUSED(message),
|
WXHWND WXUNUSED(pWnd),
|
||||||
WXWPARAM WXUNUSED(wParam),
|
WXUINT WXUNUSED(nCtlColor),
|
||||||
WXLPARAM WXUNUSED(lParam)
|
WXUINT WXUNUSED(message),
|
||||||
)
|
WXWPARAM WXUNUSED(wParam),
|
||||||
|
WXLPARAM WXUNUSED(lParam))
|
||||||
{
|
{
|
||||||
HDC hdc = (HDC)pDC;
|
HDC hdc = (HDC)pDC;
|
||||||
wxColour colBack = GetBackgroundColour();
|
wxColour colBack = GetBackgroundColour();
|
||||||
@@ -234,9 +235,30 @@ WXHBRUSH wxComboBox::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSE
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxComboBox
|
// wxComboBox callbacks
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
long wxComboBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||||
|
{
|
||||||
|
// handle WM_CTLCOLOR messages from our EDIT control to be able to set its
|
||||||
|
// colour correctly (to be the same as our own one)
|
||||||
|
switch ( nMsg )
|
||||||
|
{
|
||||||
|
// we have to handle both: one for the normal case and the other for
|
||||||
|
// wxCB_READONLY
|
||||||
|
case WM_CTLCOLOREDIT:
|
||||||
|
case WM_CTLCOLORSTATIC:
|
||||||
|
WXWORD nCtlColor;
|
||||||
|
WXHDC hdc;
|
||||||
|
WXHWND hwnd;
|
||||||
|
UnpackCtlColor(wParam, lParam, &nCtlColor, &hdc, &hwnd);
|
||||||
|
|
||||||
|
return OnCtlColor(hdc, hwnd, nCtlColor, nMsg, wParam, lParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
return wxChoice::MSWWindowProc(nMsg, wParam, lParam);
|
||||||
|
}
|
||||||
|
|
||||||
bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam)
|
bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam)
|
||||||
{
|
{
|
||||||
switch ( msg )
|
switch ( msg )
|
||||||
|
Reference in New Issue
Block a user