Hello
i have an IMAGE widget containing a PNG file. I want to have this image with transparency and make it blink (sometimes we see the balckground trough this image, and sometime we only see the baclground)
1) I created the image in the frame with :
{ IMAGE_CreateIndirect, "DLC_not_active", ID_IMAGE_DLC_NO_ACTIVE_3, 13, 9, 241, 174, WM_CF_SHOW, IMAGE_CF_MEMDEV | IMAGE_CF_ALPHA, 0 },
2) i set png file to this widget :
case WM_INIT_DIALOG:
hItem = WM_GetDialogItem(hWin, ID_IMAGE_DLC_NO_ACTIVE_3);
WM_SetCallback(hItem, _cbDLC_not_active2);
IMAGE_SetPNG(hItem, &_acImage_DLC_not_active_transparent, sizeof(_acImage_DLC_not_active_transparent));
3) in the call back i call GUI_PNG_Draw :
case WM_PAINT:
GUI_EnableAlpha(1);
if (DLG_Load_menu_hide_show == 1)
GUI_PNG_Draw(&_acImage_DLC_not_active_transparent, sizeof(_acImage_DLC_not_active_transparent), 0, 0);
GUI_EnableAlpha(0);
4) on timer event i call WM_HideWindow/WM_ShowWin
if (DLG_Load_menu_hide_show == 0)
{
WM_HideWindow(hItem);
DLG_Load_menu_hide_show = 1;
}
else
{
WM_ShowWin(hItem);
DLG_Load_menu_hide_show = 0;
}
The problem is that i can't make the image blinking (make it disapear)
It seems that with a bitmap i don't have this problem (i don't need the call back and the blinking is OK)
A) How can i make the image disapear ?
B)It seems that the PNG image has contains transparency information to display it with transparency : can we diplay a non transparent PNG image in a IMAGE WIDGET with transparency ?
Thanks
best regards
i have an IMAGE widget containing a PNG file. I want to have this image with transparency and make it blink (sometimes we see the balckground trough this image, and sometime we only see the baclground)
1) I created the image in the frame with :
{ IMAGE_CreateIndirect, "DLC_not_active", ID_IMAGE_DLC_NO_ACTIVE_3, 13, 9, 241, 174, WM_CF_SHOW, IMAGE_CF_MEMDEV | IMAGE_CF_ALPHA, 0 },
2) i set png file to this widget :
case WM_INIT_DIALOG:
hItem = WM_GetDialogItem(hWin, ID_IMAGE_DLC_NO_ACTIVE_3);
WM_SetCallback(hItem, _cbDLC_not_active2);
IMAGE_SetPNG(hItem, &_acImage_DLC_not_active_transparent, sizeof(_acImage_DLC_not_active_transparent));
3) in the call back i call GUI_PNG_Draw :
case WM_PAINT:
GUI_EnableAlpha(1);
if (DLG_Load_menu_hide_show == 1)
GUI_PNG_Draw(&_acImage_DLC_not_active_transparent, sizeof(_acImage_DLC_not_active_transparent), 0, 0);
GUI_EnableAlpha(0);
4) on timer event i call WM_HideWindow/WM_ShowWin
if (DLG_Load_menu_hide_show == 0)
{
WM_HideWindow(hItem);
DLG_Load_menu_hide_show = 1;
}
else
{
WM_ShowWin(hItem);
DLG_Load_menu_hide_show = 0;
}
The problem is that i can't make the image blinking (make it disapear)
It seems that with a bitmap i don't have this problem (i don't need the call back and the blinking is OK)
A) How can i make the image disapear ?
B)It seems that the PNG image has contains transparency information to display it with transparency : can we diplay a non transparent PNG image in a IMAGE WIDGET with transparency ?
Thanks
best regards