Posts: 1,271
Threads: 399
Joined: Mar 2003
i need to change bitmaps on my toolbar (static bitmap control) when some
content changed.
and is there any other way then converting a jpg to bmp for displaying on a bitmap control ?
Posts: 11,872
Threads: 138
Joined: Dec 2002
Toolbar ToolbarWithChangingImages
Function TWCI_Proc
;/ToolbarWithChangingImages
function# hWnd message wParam lParam
ARRAY(int)+ g_twci_a
int+ g_twci_i
sel message
,case WM_CREATE
,CreateControl(0 "Static" 0 SS_BITMAP 0 0 0 0 hWnd 3)
,g_twci_a.create(2)
,g_twci_i=0
,str s
,g_twci_a[0]=LoadPictureFile2("$my pictures$\bmpfile.bmp")
,g_twci_a[1]=LoadPictureFile2("$my pictures$\jpgfile.jpg")
,SetTimer hWnd 1 500 0
,
,case WM_DESTROY
,int i; for(i 0 g_twci_a.len) DeleteObject(g_twci_a[i])
,g_twci_a.redim
,
,case WM_TIMER
,sel wParam
,,case 1
,,SendMessage(id(3 hWnd) STM_SETIMAGE IMAGE_BITMAP g_twci_a[g_twci_i])
,,g_twci_i^1
Function LoadPictureFile2:
Image manipulation