Hi,
I'm using some ICONVIEW widgets as buttons. Is there a way to make their background transparent so that the objects behind them are visible in the parts marked as transparent?
I create the ICONVIEW in a resource table:
{ ICONVIEW_CreateIndirect, "", ID_ICONVIEW_RES, 755, 165, 45, 40, 0, 0x0028002D, 0 }, /*reset button*/
My init dialog looks like this:
I can give the background any color using ICONVIEW_SetBkColor but it never gets transparent.
With the color code GUI_TRANSPARENT it becomes black. I have also tested GUI_BLACK which is the actual background color of the image.
Best regards
Jan
I'm using some ICONVIEW widgets as buttons. Is there a way to make their background transparent so that the objects behind them are visible in the parts marked as transparent?
I create the ICONVIEW in a resource table:
{ ICONVIEW_CreateIndirect, "", ID_ICONVIEW_RES, 755, 165, 45, 40, 0, 0x0028002D, 0 }, /*reset button*/
My init dialog looks like this:
Source Code
- hItem = WM_GetDialogItem(pMsg->hWin, ID_ICONVIEW_RES); /*reset icon*/
- pData = _GetImageById(ID_IMAGE_RES, &FileSize);
- ICONVIEW_AddStreamedBitmapItem(hItem, pData, "");
- ICONVIEW_SetBkColor(hItem, ICONVIEW_CI_BK|ICONVIEW_CI_SEL|ICONVIEW_CI_UNSEL, GUI_TRANSPARENT);
- ICONVIEW_SetFrame(hItem, GUI_COORD_X, 0);
- ICONVIEW_SetFrame(hItem, GUI_COORD_Y, 0);
- WM_SetHasTrans(hItem);
With the color code GUI_TRANSPARENT it becomes black. I have also tested GUI_BLACK which is the actual background color of the image.
Best regards
Jan
The post was edited 2 times, last by JanBurg ().