- fixed UNC paths handling in wxFileSystem (Daniel Nash)
- set wxKeyEvent::m_uniChar in Unicode build
+- support for alpha channel in toolbar bitmaps (Jurgen Doornik)
wxWinCE:
wxSystemOptions::SetOption(wxT("msw.remap"), 0);
\end{verbatim}
+If you wish to use 32-bit images (which include an alpha channel for transparency)
+use:
+
+\begin{verbatim}
+ wxSystemOptions::SetOption(wxT("msw.remap"), 2);
+\end{verbatim}
+
+then colour remapping is switched of, and a transparent background used. But only
+use this option under Windows XP with true colour:
+
+\begin{verbatim}
+ (wxTheApp->GetComCtl32Version() >= 600 && ::wxDisplayDepth() >= 32)
+\end{verbatim}
+
\wxheading{Window styles}
\twocolwidtha{5cm}
const bool isVertical = HasFlag(wxTB_VERTICAL);
+ bool doRemap, doRemapBg, doTransparent;
+ if (wxSystemOptions::GetOptionInt(wxT("msw.remap")) == 2)
+ {
+ doRemapBg = doRemap = false;
+ doTransparent = true;
+ }
+ else
+ { doRemap = !wxSystemOptions::HasOption(wxT("msw.remap"))
+ || wxSystemOptions::GetOptionInt(wxT("msw.remap")) == 1;
+ doRemapBg = !doRemap;
+ doTransparent = false;
+ }
+
// delete all old buttons, if any
for ( size_t pos = 0; pos < m_nButtons; pos++ )
{
wxMemoryDC dcAllButtons;
wxBitmap bitmap(totalBitmapWidth, totalBitmapHeight);
dcAllButtons.SelectObject(bitmap);
+ if (doTransparent)
+ dcAllButtons.SetBackground(*wxTRANSPARENT_BRUSH);
+ else
dcAllButtons.SetBackground(*wxLIGHT_GREY_BRUSH);
dcAllButtons.Clear();
MemoryHDC memoryDC2;
#endif // USE_BITMAP_MASKS/!USE_BITMAP_MASKS
- if (wxSystemOptions::HasOption(wxT("msw.remap")) && wxSystemOptions::GetOptionInt(wxT("msw.remap")) == 0)
+ if (doRemapBg)
{
#if USE_BITMAP_MASKS
dcAllButtons.SelectObject(wxNullBitmap);
bitmap.SetHBITMAP(0);
#endif // USE_BITMAP_MASKS/!USE_BITMAP_MASKS
- if (!wxSystemOptions::HasOption(wxT("msw.remap")) || wxSystemOptions::GetOptionInt(wxT("msw.remap")) == 1)
+ if (doRemap)
{
// Map to system colours
hBitmap = (HBITMAP)MapBitmap((WXHBITMAP) hBitmap,