Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Colors, Icons, Jpg/BMP's on Tabs in SysTabControl32
#8
I adjusted the first example a little to be able to create an imagelist from 3 icons, see below "icns"-string
I can not get it to work, it only shows the last icon (3.ico).
The 3 icons I used are all 16x16 and .ico format.

What is the correct way to create a usable image-list from 3 icons (like shown below)?

Macro Macro5
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 SysTabControl32 0x54030040 0x0 0 0 224 110 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030300 "" "" ""

if(!ShowDialog(dd &sub.DlgProc 0)) ret


#sub DlgProc
function# hDlg message wParam lParam
int- main_dlg=hDlg
sel message
,case WM_INITDIALOG
,,str icns=
,,;c:\icons\1.ico
,,;c:\icons\2.ico
,,;c:\icons\3.ico
,,__ImageList-- il.Create(icns)
,,;; __ImageList-- il.Load("$qm$\il_qm.bmp") ;;load an imagelist craeted with QM imagelist editor
,,int htb=id(3 hDlg)
,,SendMessage htb TCM_SETIMAGELIST 0 il
,,TCITEM ti.mask=TCIF_TEXT|TCIF_IMAGE
,,ti.pszText="A"; ti.iImage=2; SendMessage htb TCM_INSERTITEMA 0 &ti
,,ti.pszText="B"; ti.iImage=3; SendMessage htb TCM_INSERTITEMA 0 &ti
,,ti.pszText="C"; ti.iImage=15; SendMessage htb TCM_INSERTITEMA 0 &ti
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)