Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change bitmap
#1
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 ?
pi
#2
Toolbar ToolbarWithChangingImages
Code:
Copy      Help
;/hook TWCI_Proc

Function TWCI_Proc
Code:
Copy      Help
;/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


Forum Jump:


Users browsing this thread: 1 Guest(s)