August 15, 2020, 02:22:31 AM

Author Topic: The Big Bang  (Read 650 times)

Offline Aurel

  • Full Member
  • ***
  • Posts: 175
    • AurelSoft
The Big Bang
« on: December 15, 2019, 09:00:33 AM »
here is a one simple demo


Offline Aurel

  • Full Member
  • ***
  • Posts: 175
    • AurelSoft
Re: The Big Bang
« Reply #1 on: December 28, 2019, 09:43:39 AM »
ListView example:
Code: [Select]
$ Filename "ListView.exe" ' o2
include "RTL32.inc"
include "awinh037.inc"
INT win,wx=200,wy=200,ww=640,wh=420,wstyle = WS_MINMAXSIZE
INT button0,b0ID=100,listv,lvID=1000,static1,st1ID=200, col1,col2,col3
INT static0,stid0 = 199,stIMG
win=SetWindow("GUI:ListView",wx,wy,ww,wh,0,wstyle)
'create static control
stImg = LoadImage(0,"adBook.bmp",0,252,30,16)
If stImg = 0 ' create static with text
static1 = SetStatic(win,10,10,254,32," Adress Book by Aurel",0,0x200,st1ID)
ControlFont (static1, 24, 11, 600, "Courier New")
Else
static0 = SetStatic(win,10,10,254,32,"",0x5000030E,0x200,stid0)
SendMessage static0 ,370, 0, stImg

End if
'crete button-----------------------------------------------------------------------
button0 = SetButton(win,270,10,80,32,"Close (X)",0x50001000,0x200,b0ID)

'create ListView --------------------------------------------------------------------
listv = SetListView (win, 10, 60, 600 , 300 ,"Name", 100, 0, 0x200, lvID)
SendMessage listv, 4150 ,0 , 32  ' extended style - full row select
INT lvImg = LoadImage(0,"add.bmp",0,16,16,16)
print str lvImg
'add listview item {AddLVI hwnd, pos, text, icon}
AddListViewItem (listv, 0, "Charles", lvImg)
AddListViewItem (listv, 1, "Aurel", 0)
AddListViewItem (listv, 2, "Walter", 0)
AddListViewItem (listv, 3, "Markus", 0)
AddListViewItem (listv, 4, "LarryMc", 0)
'add column
col1= AddListViewColumn (listv, 1, 120, "Web Site"  , 0)
'add lv_sub_item
'AddListViewSubItem (lvhandle, lvpos, lvsub , lvstring )
AddListViewSubItem (listv, 0, 1, "Oxygen Basic")
AddListViewSubItem (listv, 1, 1, "AurelSoft")
AddListViewSubItem (listv, 2, 1, "TJP Forum")
AddListViewSubItem (listv, 3, 1, "RetroB Forum")
AddListViewSubItem (listv, 4, 1, "Ionic Wind")
'
col2= AddListViewColumn (listv, 2, 250, "Web Adress"  , 0)
AddListViewSubItem (listv, 0, 2, "http://www.oxygenbasic.org")
AddListViewSubItem (listv, 1, 2, "http://aurelsoft.ucoz.com")
AddListViewSubItem (listv, 2, 2, "http://qb64.thejoyfulprogrammer.com")
AddListViewSubItem (listv, 3, 2, "http://retrogamecoding.org")
AddListViewSubItem (listv, 4, 2, "http://www.ionicwind.com")
'
col3= AddListViewColumn (listv, 3, 124, "Info"  , 0)
AddListViewSubItem (listv, 0, 3, "o2 compiler")
AddListViewSubItem (listv, 1, 3, "Personal Site")
AddListViewSubItem (listv, 2, 3, "Programming Forum")
AddListViewSubItem (listv, 3, 3, "Community Forum")
AddListViewSubItem (listv, 4, 3, "IonicWind Basic")


'------------------------------------------------------------------------------------
Wait()  'message loop
'------------------------------------------------------------------------------------
'func main
Function WndProc (sys hwnd,wmsg,wparam,lparam) as sys callback
SELECT hwnd
CASE win
Select wmsg
CASE WM_CLOSE
CloseWindow(win)
EndProgram
End Select
END SELECT
RETURN Default
END FUNCTION

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal