eVC++ 4.0 + wxwidgets

Daniel Chmielewski Daniel.Chmielewski at gmail.com
Wed Jul 18 14:00:22 PDT 2007


Hi all,
This information is for those people who wants to compile wxwidgets
2.8.4 with eVC++ 4.0 + SP 4.0 for Windows Mobile 2003 SE. The aim of
this news it to inform other people with the similar problem about the
solution ;-)

I tried to compile (make a lib) it and I got error:

 combo.cpp
 D:\wxWidgets284\src\msw\combo.cpp(181) : error
 C2440: 'initializing' : cannot convert from 'long (__cdecl
*)(void *,int,int,int,unsigned long *)' to 'long'
         This conversion requires a reinterpret_cast, a C-
 style cast or function-style cast
 combobox.cpp

after contact with John L. from users.sourceforge.net I obtain the
solution I've just have to comment the code:


void wxComboCtrl::OnThemeChange()
{
    // there doesn't seem to be any way to get the text colour using
themes
    // API: TMT_TEXTCOLOR doesn't work neither for EDIT nor COMBOBOX
 
SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));

    wxUxThemeEngine * const theme = wxUxThemeEngine::GetIfActive();
    if ( theme )
    {
        // NB: use EDIT, not COMBOBOX (the latter works in XP but not
Vista)
        wxUxThemeHandle hTheme(this, L"EDIT");
        COLORREF col;
        HRESULT hr = false;
/*
        HRESULT hr = theme->GetThemeColor
                            (
                                hTheme,
                                EP_EDITTEXT,
                                ETS_NORMAL,
                                TMT_FILLCOLOR,
                                &col
                            );
*/
        if ( SUCCEEDED(hr) )
        {
            SetBackgroundColour(wxRGBToColour(col));

            // skip the call below
            return;
        }

        wxLogApiError(_T("GetThemeColor(EDIT, ETS_NORMAL,
TMT_FILLCOLOR)"), hr);
    }

 
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
}

John, many thanks,

Regards,

Daniel







More information about the wx-users mailing list