Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Transparency issues when adding 32 bit bitmaps CTabCtrl when not using unicode.

$
0
0

I am using Visual studio 2010.  This is a dialog based app.  Using MFC and Multibyte character set. Not Unicode for historical reasons.

I am inserting tabs using the following code.

// define an image list of all possible images on tabs m_tab_images.Create(16,16,ILC_COLOR32,3,1); m_tab_images.SetBkColor(RGB(0,0,0)); //m_tab_images.Create(IDB_TAB_ICONS,16,1,RGB(0,0,0));  // low res bmp only bmOK.LoadBitmap(IDB_OK);  m_tab_images.Add(&bmOK,RGB(0,0,0)); bmWarning.LoadBitmap(IDB_warning); m_tab_images.Add(&bmWarning,RGB(0,0,0));

 bmCritical.LoadBitmap(IDB_CRITICAL); m_tab_images.Add(&bmCritical,RGB(0,0,0)); // set the image list in the tab control. m_tab_ctrl.SetImageList(&m_tab_images); forint index = 0; index < numLines; index++,lineNumber++) { CString label; label.Format(_T("Line %d"),lineNumber); m_tab_ctrl.InsertItem(index,label.GetString(),(index) % 3); }

When Unicode is enabled it works. When MultiByte character set in enabled then transparency does not work. There are black boxes around the images.

Is this a known problem?

Is there a work around?


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>