many Buttons ... and Icons ?
Posted: Wed Nov 06, 2019 10:14 am
hi,
i want to make this it have a lot of Button which are create in FOR / NEXT Loop
so how todo it wit HMG
i try to use a Macro &cButton for Button-Name ... and add "Object" to Array for later use to hide()/show()
i also like to ask if i can use PICTURE with Icon / Imagelist
---
many Windows System DLL include Icons.
this Way i get it under Xbase++
in HMG i have search for IMAGE_ICON but i seems me it "loadIcon" only from "own" Resource ... not from DLL
so how todo it under harbour / HMG
i want to make this it have a lot of Button which are create in FOR / NEXT Loop
so how todo it wit HMG
Code: Select all
FOR j := 1 TO jMax
FOR i := 1 TO iMax
cNr := STRZERO(nCount,3)
cButton := "Button"+cNr
cName := "_Form_1_"+cButton
@ (j-1)*((nHeigh-30)/jMax)+nY-10, (i-1)*((nWide+nX)/iMax) BUTTON &cButton ;
PARENT Label_1 ;
CAPTION cNr ;
PICTURE "button.bmp" ;
ACTION MsgInfo("hello "+cNr) ;
RIGHT ;
WIDTH 48 ;
HEIGHT 48
// how to add all to Array ?
// AADD(aButton,ThisWindow.Name+This.Name)
// AADD(aButton,&cName)
nCount++
NEXT
NEXT
i also like to ask if i can use PICTURE with Icon / Imagelist
---
many Windows System DLL include Icons.
this Way i get it under Xbase++
Code: Select all
// create Icon
oIco := XbpIcon() :new() :create()
// load from Windows System DLL
IF nResId = 2526 .OR. nResId = 2389
oIco:load( WinDir+"\System32\DDORes.dll", nResId,64,64 )
ELSE
oIco:load( WinDir+"\System32\imageres.dll", nResId,64,64 )
ENDIF
IF oIco:xSize > 0
xImage := oIco
ELSE
oIco:Destroy()
ENDIF
so how todo it under harbour / HMG