X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d90895ac118ad4546eed7ee4c358a3fe644a1ad7..0240e8b1aa935d43689b0b8ec36de3c06c1a4758:/src/os2/toolbar.cpp diff --git a/src/os2/toolbar.cpp b/src/os2/toolbar.cpp index 922a55e998..4ed0456193 100644 --- a/src/os2/toolbar.cpp +++ b/src/os2/toolbar.cpp @@ -16,7 +16,7 @@ #include "wx/wx.h" #endif -#if wxUSE_BUTTONBAR && wxUSE_TOOLBAR && defined(__WIN95__) +#if wxUSE_BUTTONBAR && wxUSE_TOOLBAR #include "malloc.h" #define INCL_PM @@ -157,14 +157,16 @@ bool wxToolBar::Create(wxWindow *parent, // Toolbar-specific initialisation ::SendMessage(hWndToolbar, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), (LPARAM)0); -*/ m_hWnd = (WXHWND) hWndToolbar; + if (parent) parent->AddChild(this); SubclassWin((WXHWND)hWndToolbar); return TRUE; +*/ + return FALSE; } wxToolBar::~wxToolBar() @@ -553,6 +555,8 @@ void wxToolBar::OnMouseEvent(wxMouseEvent& event) void wxMapBitmap(HBITMAP hBitmap, int width, int height) { +// TODO: +/* COLORMAP ColorMap[] = { {BGR_BUTTONTEXT, COLOR_BTNTEXT}, // black {BGR_BUTTONSHADOW, COLOR_BTNSHADOW}, // dark grey @@ -581,29 +585,26 @@ void wxMapBitmap(HBITMAP hBitmap, int width, int height) { for ( j = 0; j < height; j++) { -// COLORREF pixel = ::GetPixel(hdcMem, i, j); -/* + COLORREF pixel = ::GetPixel(hdcMem, i, j); BYTE red = GetRValue(pixel); BYTE green = GetGValue(pixel); BYTE blue = GetBValue(pixel); -*/ for ( k = 0; k < NUM_MAPS; k ++) { if ( ColorMap[k].from == pixel ) { -// /* COLORREF actualPixel = */ ::SetPixel(hdcMem, i, j, ColorMap[k].to); + COLORREF actualPixel = ::SetPixel(hdcMem, i, j, ColorMap[k].to); break; } } } } - -// SelectObject(hdcMem, hbmOld); -// DeleteObject(hdcMem); + SelectObject(hdcMem, hbmOld); + DeleteObject(hdcMem); } - +*/ } // Some experiments...